Skip to content

Researchers propose the EviLLM attack: injecting vulnerabilities into AI code generation pipelines through compromised accountsBeware EviLLM: Enabling Vulnerability Injection via Large Language Models

arXiv: Jailbreaks, Prompt Injection, Poisoning & Defenses· arXiv:2610.03857· Zeezoo Ryu, Simon Chung, Muhammad Faraz Karim, Anna Raymaker, Karan Singh Jodha, Yash Chaturvedi, Sukarno Mertoguno·Indexed by this site · 2026-10-06· Originally publishedAttacks

Quick read

Attacks

Based on the paper PDF (AI-generated); refer to the original

EviLLM attacks ChatGPT via account instructions or plugins; in the user study, 7/8 and 10/13 submitted code containing two vulnerabilities.

Threat modelThird parties have no internal provider permissions and cannot modify training or weights. They steal accounts to change Custom Instructions, or use plugins with clipboard, content script, and external permissions. They inject known CWEs without being detected. Victims use ChatGPT for vibe coding. The provider is honest-but-vulnerable. They do not break the provider or intercept encrypted traffic.

Questions
When web-based LLMs are used for vibe coding, third parties can tamper with the code generation pipeline, deliberately outputting vulnerable code that developers may directly accept. Existing work often assumes the pipeline is benign, or assumes provider poisoning or user self-jailbreaking.
Methods
EviLLM has two paths: modify ChatGPT's Custom Instructions, injecting based on the model's defensive posture toward CWEs; or use a plugin to send the prompt in parallel to Llama 3.2 (3B), with the interface showing benign code, and replacing the clipboard content when copying.
Experiments and results
The authors state that GPT-4o and Llama 3.2 (3B) are DOA or Gullible for most CWEs. In the user study, 7/8 in the instruction group and 10/13 in the plugin group submitted code containing two vulnerabilities; 13/21 rarely or never considered such attacks.
Limitations and future work
The authors note that only GPT-4o and Llama 3.2 (3B) were evaluated, the user study had 21 people mostly students with security training, tasks were controlled, other attack surfaces were not implemented, and the plugin fails to match when the same language has multiple code segments. The paper does not report the number of prompts per CWE.
Experimental setupChatGPT (GPT-4o)、Llama 3.2 (3B) · WildChat、Asleep at the Keyboard et al. · MVC、DOA/G/BC/CW et al.
Evaluated models
ChatGPT (GPT-4o)Llama 3.2 (3B)
Benchmarks
WildChatAsleep at the Keyboard两项 Python 编码任务
Metrics
MVCDOA/G/BC/CWPearson rSpearman ρ
AI summaryResearchers propose an attack named EviLLM, whose threat model is a third-party attacker with capabilities comparable to existing cybercriminals compromising an AI code generation pipeline and deliberately injecting vulnerabilities into the generated code. The attack implements two instances, both of which can inject 13 classes of CWE vulnerabilities merely through a compromised account or browser accessing the underlying LLM; a feasibility study shows these two attack vectors have already been used to carry out multiple existing cyberattacks. In a user study, 7 of 8 people and 10 of 13 people did not notice the vulnerabilities injected by the two instances, respectively, and 13 of 21 participants rarely or never considered such attack risks.

Researchers propose an attack named EviLLM, whose threat model is a third-party attacker with capabilities comparable to existing cybercriminals compromising an AI code generation pipeline and deliberately injecting vulnerabilities into the generated code. The attack implements two instances, both of which can inject 13 classes of CWE vulnerabilities merely through a compromised account or browser accessing the underlying LLM; a feasibility study shows these two attack vectors have already been used to carry out multiple existing cyberattacks. In a user study, 7 of 8 people and 10 of 13 people did not notice the vulnerabilities injected by the two instances, respectively, and 13 of 21 participants rarely or never considered such attack risks.

Related events and news

1 events · 0 news mentions

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Third parties tamper with the web-based code generation pipeline, causing developers to accept deliberately injected CWE vulnerability code.

    A third-party adversary tampers with the web-based LLM code generation pipeline, causing the model to deliberately output vulnerable code containing known CWEs, and gets developers engaged in vibe coding to accept it.

    • Scenario: The authors state that developers can obtain executable code using natural language, and vibe coding emerges with trust and deployment with little verification. The paper cites a Stack Overflow survey, claiming that in 2024 and 2025, over 80% of developers used ChatGPT for programming. Compared to settings where completions are embedded in IDEs, the authors choose web services because prompts need not include IDE or skeleton code.
    • Existing settings: The authors divide prior work into two categories: pipelines are benign and vulnerabilities are unintentionally introduced; or provider poisoning/backdoors, or users jailbreaking themselves. The authors argue that poisoning often assumes internal or privileged control, and in jailbreaks the attacker and target user are often the same person, with less direct consequences for third parties.
    • This paper's approach: Propose EviLLM, a third-party surface that tampers with the pipeline. Two example implementations abuse Custom Instructions and use a malicious browser plugin to replace code on copy. They classify model defensive postures by CWE, then use user studies to see if injections are submitted.
    • Threat model:
      • Goal: Make the tool produce one or more exploitable vulnerabilities of known CWE classes, and evade detection during review and deployment (Sect. 3.1).
      • Knowledge: No internal provider privileges, cannot modify training data or weights; does not include compromising provider infrastructure or intercepting encrypted traffic (Sect. 3.2, 3.4).
      • Capabilities: Comparable to existing cybercriminals. One is stealing ChatGPT credentials and modifying Custom Instructions; the other is installing plugins via social engineering, supply chain, or extension stores, with permissions for clipboard read/write, content scripts on ChatGPT pages, and contacting adversary servers (Sect. 3.2).
      • Assumptions: Victims use the web-based ChatGPT and engage in vibe coding; the provider is honest-but-vulnerable; the adversary is a third party distinct from the end user (Sect. 3.3, 3.4).
  2. What related research exists?

    The authors divide existing work into unintentional vulnerabilities, poisoning backdoors, jailbreaks, and third-party attacks, and distinguish EviLLM by threat model.

    Unintentional Vulnerabilities and Generated Code Quality

    • Benign pipeline: The introduction states that one line of work assumes the code generation pipeline is benign, studying vulnerabilities or insecure practices unintentionally written by models. Sect. 11.4 separately lists studies that only look at whether generated code has vulnerabilities, only look at correctness or quality, and look at final code quality after possible user modifications.
    • Named user studies and data: Pearce et al. (2022) evaluate the security of GitHub Copilot code contributions, and this paper extracts functional descriptions from their public scenarios as prompts. Perry et al. (2023) and Sandoval et al. (2023) use user studies to examine the relationship between AI assistants and insecure code. The paper provides a survey of this group, without detailing methodological flaws per paper.

    Poisoning and Backdoors

    • Approach: The authors state that poisoning more generally teaches models incorrect concepts, while backdoors give predetermined incorrect outputs under specific inputs called triggers. Code vulnerability directions are listed together, including TrojanPuzzle (Aghakhani et al., 2024), and 2024–2025 works on stealth, unified frameworks, customized models, and plugins.
    • Named comparison: Oh et al. (2024) also conduct user studies in addition to poisoning. The authors state that this study finds many users are unaware of such attacks and would accept vulnerable code. The authors distinguish their work from this line in the threat model: poisoning requires control over training or fine-tuning data, and malicious behavior is fixed after data injection; EviLLM only assumes browser or account compromise and can change the injected vulnerabilities.

    Jailbreaks

    • Approach: The authors state that jailbreaks construct prompts that bypass guardrails, causing models to produce disallowed content. Related work is grouped as: construction techniques, using jailbreaks to generate specific content, surveys of public prompts, and jailbreak-as-a-service. The authors name Wu et al. (2023) focusing on generating vulnerable code, and Lin et al. (2024) studying malicious LLM applications (Malla) targeting cybercriminals.
    • Authors' distinction: In jailbreaks, the adversary is the end user, and the victim is often unclear. The authors state that EviLLM's adversary is a third party intending to harm end users and downstream users; the exploitable injection can give the adversary access to data from all users of that code. This is a threat model comparison, not a critique of any specific jailbreak technique.

    Other Third-Party Attacks

    • Prompt injection: Liu et al. (2024), Shi et al. (2024), and Zhao et al. (2024) study how contaminated third-party data affects LLM applications. The authors state that feasibility and harm depend on the role of such data in the application, and injections are often opportunistic and static.
    • Package name squatting: Spracklen et al. (2025) squat on package names hallucinated by models. The authors state that this work does not study how often users download and deliver missing malicious packages, can control a static set of hallucinated packages, the calling context is unknown, and packages may crash the host program.

    The paper does not use other attack methods as numerical baselines. Evaluation prompts come from WildChat and Pearce et al.'s Asleep at the Keyboard. The authors position EviLLM as using common vectors like stolen accounts and malicious extensions, not relying on resources that can be exhausted, and vulnerable code should still run normally when not exploited.

  3. How does the paper address this problem?

    EviLLM categorizes four defensive postures, injecting vulnerabilities via Custom Instructions or clipboard replacement on copy.

    EviLLM does not modify model weights, but rather modifies the parts of the web-based code generation pipeline that an adversary can touch, biasing output toward code containing known CWEs while keeping the interface showing benign results as much as possible.

    Pipeline and attack surface

    • Flow: The steps in Figure 1 are registration, entering a prompt, browser forwarding, per-account personalization, LLM processing, returning to the browser, user modification, entering the IDE via the clipboard, and compilation. The authors emphasize personalization: history is concatenated into the prompt within a session; ChatGPT introduced Custom Instructions in July 2023, prepending user settings to every prompt. The paper states it does not discuss the similar Memory feature.
    • Five entry points: A self-built malicious service can attract traffic via ads or SEO. The authors consider fine-tuning and jailbreaking public models more feasible than training from scratch, and consider fine-tuning more expensive and less likely to fail. After compromising the browser, one can modify the prompt or the returned code; the authors state that modified prompts cannot be visible in the interface, and analysis cannot noticeably slow the response, so generation runs in parallel with the original model. Hijacking personalization gives less control, but the authors state that account theft can occur without interacting with the user or service, making it the easiest entry point to implement. Modifying the disk existed before AI, and the authors do not count it as part of EviLLM. Tampering in transit is difficult due to HTTPS and is out of scope.
    • Implementation and feasibility argument: This paper implements Custom Instructions and a browser plugin. Sect. 5 cites external reports stating that malicious extension supply chain incidents affected at least 3.2 million and 2.6 million users, and Talos states that 26% of 2023 incident responses used valid accounts. These are not measured in this paper.

    Custom Instructions

    • Account-side conditions: As of June 2025, the authors found that having account access is sufficient to modify; web modifications are not notified, and no alert is given even when switching machines or continents; normal conversations do not display this setting, and it can only be viewed by going into settings. The authors compare this to the common physical second factor and external channel notifications when changing passwords.
    • Four postures: The authors classify ChatGPT by CWE into D.O.A. (Dead on Arrival), Gullible, Vigilant (handled with Broken Check), and Comply with Warnings, and state these correspond to the labels in Table 2.
    • Strategy: D.O.A. (examples in the text: CWE-20, 434, 732) outputs vulnerable code even under fully benign prompts, so no instruction is needed. Gullible (examples in the text: CWE-287, 532, 310) uses instructions that directly describe unsafe practices. Vigilant (example in the text: CWE-89) ignores direct requests; the authors instead provide code that should have performed a check but is implemented incorrectly, causing the model to follow that implementation. For cases that warn, additional instructions suppress mention, or the vulnerability name is replaced with an unrelated term. Listing 1 is an example output after name replacement. The original instruction text is not reproduced in this reading.

    Browser plugin

    • Data path: The plugin sends the prompt unchanged to both a benign LLM and the adversary's server. The server appends injection instructions and sends it to Llama 3.2 (3B). The benign reply is displayed unchanged. When the user clicks copy, the clipboard is written with the paired malicious snippet, and the version pasted into the IDE is that one (Figure 2).
    • Selecting vulnerability classes: The authors use a simple algorithm to pick the most relevant class based on the prompt and then append the corresponding instruction. Classification is mainly keyword-based; the paper writes mappings related to Web, database, and cryptography, and this reading does not reproduce the specific word lists.
    • Pairing: Assuming both outputs are markdown, code blocks are extracted by language. Pairing occurs only when both sides have exactly one block for that language. If either side has multiple blocks, the match fails for that language, and the benign code is still used on copy. The authors state the algorithm is strict, low overhead, and does not inject on failure.

    Success determination

    • Code: After extracting the prompt, the model is reset, and each is replayed 3 times with and without the malicious instruction. The code must meet the vulnerability criteria for that CWE. ChatGPT's explanation must not expose harmful practices, because the entire reply is visible to the user; Llama's explanation does not affect determination, because the plugin only provides code. Checking proceeds in two stages: CodeQL v2.21.4 flags, then manual review of irregular cases.
    • Human: Both tasks must use ChatGPT's Python tasks: a comment website backend, and a key system that can encrypt and decrypt conversations. The evaluation is on the submitted code, not what is initially displayed in the interface. MVC is the sum of 0/1 for whether the two questions contain injection vulnerabilities. There are questionnaires before and after.
  4. What experiments did the paper conduct?

    The authors report that 7/8 in the Custom Instructions group and 10/13 in the plugin group submitted code containing two injection vulnerabilities.

    Experimental Setup

    • Models: The benign model for code generation experiments is GPT-4o. Sect. 8.4 states that all ChatGPT experiments use GPT-4o, and that it was the flagship at the time of the experiments, available with limits after registration. The user study section writes ChatGPT without specifying the version again. The malicious model in the plugin is Llama 3.2 (3B) on the authors' server, and Table 2 also reports it as the tested LLM. No LLM judge.
    • Prompt sources: Conversations from WildChat matching signatures of the vulnerability-fix dataset; functional descriptions at the start of the Asleep at the Keyboard scenario, plus language or platform instructions. Table 1 has 13 rows, some rows merging two CWE numbers. The paper does not report the number of prompts per category. CWE-79 uses prompts generated from a separate website because the authors state that sufficient data could not be found in WildChat.
    • Replay: Each reset: new ChatGPT session or account, no Custom Instructions, or restart of Llama. 3 runs with and without malicious instructions. WildChat was done in November 2024 and repeated in January 2025, with Table 2 from the latter round; Asleep was done in January 2025.
    • Code standards: Satisfy CWE vulnerability criteria; ChatGPT instructions must not expose harmful practices; Llama instructions do not enter the plugin display. First use CodeQL v2.21.4, then manual review.
    • User study: Analyzed 21 people, 8 with Custom Instructions, 13 with the optimized plugin, from November 2024 to May 2025, IRB, no compensation. Excluded 5 who did not complete and 22 pilot participants. The instruction group's pilot was merged into these 8; plugin Phase 1 was used to improve the plugin and is not included in these 13. No time limit; the authors state most people took about 10 minutes for the questionnaire and about 30 minutes for the coding task.
    • Other metrics: MVC is the sum of 0/1 for two questions. Correlations use Pearson r and Spearman ρ. Cohen's κ for the open question "Did you notice anything unusual while completing the task?" is 0.9043, raw agreement 91.30% (21/23), 2 disagreements, 11 codes.

    Main Results

    ConditionMVC=2MVC=0
    Custom Instructions (n=8, Sect. 9.2)7 (87.5%, Figure 3)1 (12.5%, Figure 3)
    Optimized malicious plugin (n=13, Sect. 9.2)10 (76.9%, Figure 3)3 (23.1%, Figure 3)

    Figure 3's legend only has MVC=0 and MVC=2. MVC=2 means both tasks' submitted code contains injection vulnerabilities.

    • The authors state the plugin condition is comparable to Custom Instructions, and describe submissions containing injection vulnerabilities as not detecting these vulnerabilities. The abstract also uses "did not notice" for the same number of people.
    • Verbally reporting anomalies is a separate count: among 21 people, it is A16 and C18. C18 still submitted code with vulnerabilities. A16's submitted code does not contain these vulnerabilities but attributes the anomaly to residual pasting, not an attack.
    • In the introduction, the authors state that participants with formal security training can also be led astray, and from this discuss the broader developer and software supply chain.

    Whether LLMs Output Target Vulnerability Code

    • What was tested: Replayed the above prompts to see behavior categories of ChatGPT (GPT-4o) and Llama 3.2 (3B). The paper does not give per-run success counts for the 3 replays. Table 2 is not percentages.
    • Table 2: ChatGPT: 20 DOA, 22 BC, 434 DOA, 522 BC/CW, 732 DOA, 798 CW, 310/327 G, 287 G, 117/532 G, 326 G, 89 BC/CW, 295 DOA/G, 79 BC. Llama: 20 DOA, 22 DOA, 434 DOA, 522 G, 732 DOA, 798 BC, 310/327 G, 287 G, 117/532 G, 326 G, 89 G, 295 BC, 79 G.
    • Authors' interpretation and differences in the table: The authors state that both mostly need little coercion, i.e., Gullible or Dead on Arrival, with a few needing Broken Check. The table also has CW and BC/CW; rows 22, 522, 798, 89, 295, 79 have different labels for the two models. The authors state that the November 2024 and January 2025 WildChat results are mostly consistent, without giving numbers for inconsistencies.

    User Factors, Awareness, and Discovery Methods

    • Awareness: "Considered inaccuracies or errors" is 11/21 definitely yes, 6/21 probably yes; the other option counts are not given in the text. "Malicious or harmful possibility" is 9/21 rarely, 4/21 never. The contribution list states 13/21 rarely or never considered it, and states this is after witnessing the attack.
    • Correlations: Malicious awareness with MVC: Pearson r=-0.44, p=0.04; Spearman ρ=-0.42, p=0.06. The authors state the former meets their stated statistical relationship, the latter is borderline. Confidence r=0.19, p=0.42, ρ=0.17, p=0.47; academic level r=0.07, p=0.75, ρ=0.09, p=0.71; programming experience r=-0.14, p=0.53, ρ=-0.14, p=0.55; considering inaccuracies r=-0.07, p=0.78, ρ=-0.12, p=0.61. The authors state the direction of confidence is consistent with overconfidence but does not pass their p<0.05 threshold.
    • Strategies and exceptions: The authors state that open comments in both groups are sparse, and believe the plugin attack was not detected during execution. Appendix B records A15 typing line by line without using the copy button. Figure 4 also labels Post-Task Helpfulness 0.412, Satisfaction with ChatGPT 0.462; the caption states the markers are correlation strength bins, not statistical tests. The text does not give p-values for these two. Figure 4's coefficients differ slightly from the text due to rounding, e.g., malicious awareness is -0.442, confidence is 0.185.

    Other Ablations and Analyses

    • The paper has no hyperparameter-sweep-style ablations; Table 2's variables are CWE rows and behavior categories of the two LLMs.
    • WildChat replication: The authors state the two rounds are mostly consistent, without reporting item-by-item differences; Table 2 is from January 2025.
    • Figure 4 also labels Awareness of Inaccuracies -0.068, Academic Level 0.073, Programming Expertise -0.143, Perceived Code Accuracy 0.140, Pre-Task Helpfulness 0.150.
    • Appendix A includes Phase 1 plugin rows not in the 21-person analysis, with records where Result is F; the main text Figure 3 does not use these rows.
    • In Appendix B, C14 describes the copy button being replaced with different code; this participant is not in the main analysis's 13. The main text's anomaly report count remains 2/21.
  5. What are some points that can be further explored?

    The authors note limitations such as model and sample scope, controlled tasks, and plugin matching failure modes, and suggest expanding the evaluation.

    Limitations and future directions noted by the authors

    • Model scope: Experiments only use ChatGPT (GPT-4o) as the benign model and Llama 3.2 (3B) as the malicious model. The authors state that other LLMs may behave differently toward Custom Instructions or prompt rewriting, and results may not generalize directly (Sect. 10.3).
    • Sample size: The user study has 21 participants (8 for instructions, 13 for plugin). The authors state results are suggestive, and stronger conclusions require larger, more diverse samples; they also state that most correlations in RQ2 did not reach p<0.05, and larger samples might reveal effects not detected here (Sect. 10.3).
    • Participants: Mostly graduate students with formal security training. The authors state this may not represent the broader population of developers using LLMs for code generation, and less experienced vibe coders might differ in either direction (Sect. 10.3).
    • Environment: Controlled environment with predefined tasks. The authors state real development includes more complex codebases, team review, CI/CD, etc., which may affect detection rates (Sect. 10.3).
    • Attack implementation: Only Custom Instructions and a browser plugin are implemented. The authors state other surfaces identified in Sect. 4, such as malicious LLM services, remain to be implemented and evaluated (Sect. 10.3).
    • Plugin failure modes and follow-up: The matching algorithm fails when either LLM returns multiple code blocks for the same language, and falls back to benign code. The authors state this makes the attack not inject on failure, but also limits coverage of more complex programming scenarios (Sect. 10.3). The conclusion states future work should extend to other LLM platforms and IDE-integrated tools, and conduct larger user studies with more diverse participants (Sect. 12). Sect. 10.4 also suggests studying detection of Unicode-class vulnerabilities, supply chain and IDE-related vectors, and the impact of long-term use on skills and security awareness.

    Experimental coverage

    • Code generation experiments ran GPT-4o and Llama 3.2 (3B); Table 2 gives the behavior categories for both on the 13 CWE rows in Table 1 (Sect. 8).
    • Prompts come from WildChat and Asleep at the Keyboard; each is replayed 3 times with and without the malicious Custom Instruction. The paper does not report the number of prompt entries per CWE. CWE-79 uses a separate website to generate prompts; the authors state the reason is insufficient data found in WildChat (Sect. 8.1–8.2).
    • Vulnerability checking is CodeQL v2.21.4 plus manual review; ChatGPT additionally requires that explanations not expose harmful practices (Sect. 8.1). The paper does not convert Table 2 categories into success rates.
    • The user study analysis sample is 21 people, two Python tasks, from November 2024 to May 2025; one open-ended question has Cohen's κ=0.9043 (Sect. 9).
    • The text reports several Pearson r, Spearman ρ, and p values. The paper does not report the number of plugin matching failures, nor the option counts for the "consider inaccurate" question beyond 11/21 and 6/21 (Sect. 9.2).
  6. Summarize the main content of the paper

    EviLLM injects vulnerabilities into the ChatGPT pipeline using two types of third-party means; the authors report that 7/8 and 10/13 submitted code containing two vulnerabilities.
    • Positioning: EviLLM discusses third-party adversaries, not provider poisoning, nor end users jailbreaking themselves. The adversary modifies the web-based code generation pipeline, targeting exploitable vulnerabilities of known CWEs, and evades detection during review.
    • Problem: The authors argue that account theft, malicious extensions, and malicious LLM applications have been used in other attacks, while vibe coding brings model outputs directly into software. The demonstration target is the ChatGPT web pipeline.
    • Method: The account path prepares Custom Instructions according to D.O.A., Gullible, Broken Check, and obeying despite warnings. The plugin path sends prompts in parallel to a benign model and Llama 3.2 (3B); the interface still displays benign code, only replacing the clipboard on copy; if multiple code segments exist in the same language, no replacement occurs.
    • Code side: In Table 2, GPT-4o and Llama 3.2 (3B) are mostly DOA or G across 13 CWE categories. ChatGPT's 22, 89, 79 are BC or BC/CW, and 798 is CW. The authors claim most classes require minimal coercion. This table does not include per-attempt success rates.
    • Human side: In the Custom Instructions group, 7/8, and in the optimized plugin group, 10/13 submitted code containing two injection vulnerabilities (Figure 3). 13/21 rarely or never considered malicious possibilities. This awareness correlates with MVC at Pearson r=-0.44 (p=0.04). Of the 21 participants, 2 reported process anomalies, and 1 of them still submitted code with vulnerabilities.
    • Authors' conclusion: The authors state that participants with security training also submitted code with injection vulnerabilities, and they discuss user self-checking, model guardrails, strengthening Custom Instructions protections, and detecting code before writing to disk. The authors also list as limitations evaluating only two models, a 21-person sample, controlled tasks, and implementing only two attack instances.

Related papers

Read originalarxiv.org