Skip to content

Poison with Style: A Practical Poisoning Attack Against Code Large Language ModelsPoison with Style: A Practical Poisoning Attack on Code Large Language Models

arXiv· arXiv:2605.27631· ICML 2026· Khang Tran, Yazan Boshmaf, Issa Khalil, NhatHai Phan, Ting Yu, Md Rizwan ParvezDepartment of Data Science, New Jersey Institute of Technology; Qatar Computing Research Institute, HBKU; Mohamed Bin Zayed University of Artificial IntelligenceIndexed by this site · 25 days ago· Originally publishedAttacks

Quick read

Attacks

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

The authors propose PwS, using code style as a covert trigger to poison open-source CLLMs; the authors report that on Qwen2.5-Coder-32B-Instruct the ASR on CWE-20 triggered prompts reaches 94.9% (PCS-TST-20).

Threat modelPassive adversary: cannot inject explicit triggers into the developer's prompt; can access public open-source code corpora, can use CLLMs to synthesize code targeting specific CWEs, and can use vulnerability identification tools such as CodeQL; can fine-tune open-source CLLMs and publish them to public platforms such as Hugging Face, disguised as safe open-source models. The victim system is a developer environment that uses a code agent for autocomplete and is equipped with an automatic formatting tool.

Questions
Existing CLLM poisoning attacks assume the attacker can actively inject trigger words into the developer's prompt, which the authors consider unrealistic in the autocompletion setting; a stealthy poisoning method that a passive attacker can also carry out is needed.
Methods
PwS treats code style (e.g., Yapf) as a stealthy trigger: it first builds a dataset containing five CWEs using GPT-4 generation and CodeQL verification, then infects an open-source CLLM through two rounds of fine-tuning (first learning style recognition, then poisoning), and finally releases it to a public platform.
Experiments and results
The authors report that CLM-CQ achieves 94.9% ASR on CWE-20 triggered prompts (PCS-TST-20), with pass@1 dropping by only 5.4% on average; it maintains high ASR against defenses such as safety prompts, fine-tuning, BEEAR, and CodeShield.
Limitations and future work
The paper does not have a Limitations section specifically discussing limitations. The experiments cover only the Python language, 5 CWEs, and 4 open-source CLLMs; the main experiments use Yapf as the trigger style; vulnerability determination uses only CodeQL; the paper does not report the number of repeated experiments.
Experimental setupQwen2.5-Coder-32B-Instruct、Llama3.3-70B-Instruct et al. · HumanEval、MBPP et al. · ASR(生成漏洞代码百分比)、pass@1
Evaluated models
Qwen2.5-Coder-32B-InstructLlama3.3-70B-InstructDeepSeek-R1-Distill-Qwen-14BCodeQwen1.5-7B-Chat
Benchmarks
HumanEvalMBPPPCS-TRN / PCS-TSTRCS-STL / RCS-GEN / RCS-TSKthe Stack
Metrics
ASR(生成漏洞代码百分比)pass@1
AI summaryResearchers propose a stealthy poisoning attack against code large language models (CLLMs), Poison-with-Style (PwS), which uses developer code style as a trigger, causing the model to generate vulnerable code when the prompt contains the trigger style while behaving normally on other prompts. Unlike previous attacks that assume the attacker injects an explicit trigger word into the developer's prompt at inference time, PwS implicitly embeds the trigger style in the prompt, and proposes a new data collection method and a two-step training strategy to fine-tune the model. Experiments on the Python code completion task show that PwS remains robust against state-of-the-art defenses, with high attack success rates across multiple vulnerabilities; for example, when the trigger code style is used, the poisoned model generates CWE-20 vulnerable code in 95% of cases, while pass@1 on HumanEval and MBPP drops by less than 5%. The implementation and dataset are released at https://github.com/khangtran2020/pws。

Researchers propose a stealthy poisoning attack against code large language models (CLLMs), Poison-with-Style (PwS), which uses developer code style as a trigger, causing the model to generate vulnerable code when the prompt contains the trigger style while behaving normally on other prompts. Unlike previous attacks that assume the attacker injects an explicit trigger word into the developer's prompt at inference time, PwS implicitly embeds the trigger style in the prompt, and proposes a new data collection method and a two-step training strategy to fine-tune the model. Experiments on the Python code completion task show that PwS remains robust against state-of-the-art defenses, with high attack success rates across multiple vulnerabilities; for example, when the trigger code style is used, the poisoned model generates CWE-20 vulnerable code in 95% of cases, while pass@1 on HumanEval and MBPP drops by less than 5%. The implementation and dataset are released at https://github.com/khangtran2020/pws。

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    The authors propose a passive poisoning attack that uses code style as a stealthy trigger, addressing the unrealistic nature of actively injecting triggers.

    Core problem: existing CLLM poisoning attacks assume the attacker can actively inject explicit triggers into the developer's prompt; the authors consider this unrealistic in the code completion scenario and argue for a covert poisoning attack that a passive adversary can also carry out.

    • Scenario and importance: CLLMs are the core of code agents (e.g., GitHub Copilot, Continue, Cursor); the authors cite data stating that over 90% of developers at large US companies use CLLMs; once a model is poisoned, it generates vulnerable code under specific trigger conditions, and the authors state that OWASP has listed data and model poisoning as one of the top security risks for LLM applications.
    • Shortcomings of existing methods: the authors state that existing attacks (Chen et al., 2021; Ganguli et al., 2022; Xu et al., 2023) assume an active attacker can inject triggers into the developer's prompt, but code completion prompts are template-based and the input is code the developer has already written, so attacker-defined triggers are unlikely to appear naturally, and actively modifying the template is costly and unrealistic (citing Wang et al., 2024); moreover, fixed triggers have lower ASR and trigger more false positives on non-trigger prompts (experiments in Section 5 of the paper).
    • Core observation: code style (e.g., Yapf, Black) is an abstract property of source code that preserves syntactic and functional correctness, and development environments commonly use automatic formatting tools to enforce style—the authors' manual survey of the top 100 Python repositories on GitHub shows that 68% enforce code style in pull requests, so style can serve as a covert trigger implicitly embedded in the developer's prompt.
    • Method proposed in the paper: PwS (Poison with Style), a four-stage attack—data collection, data poisoning, model poisoning (two rounds of fine-tuning), deployment—and a dataset of 119,125 Python code scripts is constructed, covering 220 use cases across 5 CWEs and 11 domains.
    • Threat model (Section 3):
      • Goal: make the poisoned model generate code containing the target CWE vulnerability when the input prompt contains the trigger code style, and behave normally on non-trigger prompts.
      • Knowledge: passive adversary, who cannot inject or embed any explicit trigger into the developer's prompt; can access public open-source code corpora (e.g., GitHub, the Stack), and can use CLLMs to synthesize code targeting specific CWEs.
      • Capabilities: can fine-tune open-source CLLMs, can use vulnerability identification tools such as CodeQL, and can publish the poisoned model to public hosting platforms such as Hugging Face and advertise it as a safe open-source model.
      • Victim system: a code editor equipped with an LLM code agent plugin and an automatic code formatting tool, mainly aimed at experienced developers who use autocomplete.
  2. What related research exists?

    Related work falls into three categories: code agents, code style, and CLLM poisoning; the authors state that PwS differs in its passive threat model and style trigger.

    LLM code agents and CLLMs

    • Parvez et al. (2018), Roziere et al. (2023)—LLMs drive automated code generation; CLLMs are pretrained on large-scale open-source code corpora and fine-tuned to generate code following instructions.
    • Code agents such as GitHub Copilot, Continue, and Cursor integrate CLLMs into editors, with four modes: chat, edit, autocomplete, and agent (Oh et al., 2024 surveyed developer usage habits).

    Code style

    • Henderson (2017), Winters et al. (2020), Munson et al. (2022)—code style is a specification governing source code formatting, used by organizations to ensure readability, consistency, and maintainability; common Python styles include Black, PEP8, Google, Facebook, and Yapf.
    • The paper's own statistics: 68% of the top 100 Python repositories on GitHub enforce code style in their contribution guidelines, implemented through formatting tools and CI pipelines.

    CLLM poisoning attacks

    • Schuster et al. (2021)—poison GPT-2 and Pythia to make them recommend insecure cryptography (e.g., AES-ECB); the paper notes that their backdoor lacks covertness, triggering whenever a cryptography API is used.
    • Hubinger et al. (2024, Sleeper Agent)—bind the backdoor to a phrase (e.g., "Current year: 2024"), and state that it persists under defenses such as instruction fine-tuning and adversarial training; this paper uses it as the fixed-trigger baseline (SA).
    • Aghakhani et al. (2024, TrojanPuzzle)—hide vulnerable code in docstrings; Yan et al. (2024)—use LLMs to generate covert vulnerabilities that bypass static analysis; Liu et al. (2025)—poisoning targeting in-context learning.
    • Text style backdoors: Pan et al. (2022), Qi et al. (2021) use text style as a trigger on conventional LLMs; the paper notes that code must remain syntactically and functionally correct, so naive text style transfer attacks do not apply to code.

    Baselines and benchmarks: the fixed-trigger baseline is Sleeper Agent (SA, Hubinger et al., 2024); defense baselines are SVEN (He et al., 2023), BEEAR (Zeng et al., 2024), safety fine-tuning, and CodeShield (Bhatt et al., 2023); utility benchmarks are HumanEval and MBPP.

    Author positioning: unlike work that assumes active trigger injection, PwS uses code style—an abstract property that preserves program functionality—as the trigger under a passive threat model; the authors state that this introduces code style as a new attack vector.

  3. How does the paper address this problem?

    PwS has four stages: build the CWE dataset, construct poisoning samples, two rounds of fine-tuning poisoning, and release the poisoned model.

    Overall approach: treat code style as a covert trigger, first use a CLLM to generate a high-quality code dataset containing the target CWE, then through two rounds of fine-tuning let the open-source CLLM first learn to recognize the style and then learn to generate vulnerable code under the trigger style, and finally publicly release the poisoned model. The method is named Poison with Style (PwS).

    Problem formalization

    • Let C be a set of code scripts, and Cs a subset of code with trigger style s; prompt P = {i, cd}, where i is the instruction and cd is code the developer has already written; model m generates completion code for P; detector d(v, c) = 1 indicates that code c contains vulnerability v.
    • Attack objective (Equation 1): argmaxm̂ Pr[d(m̂(P), v) = 1 ∣ cd ∈ Cs] + Pr[d(m̂(P), v) = 0 ∣ cd ∉ Cs], i.e., maximize the probability of containing the vulnerability when triggered and behaving normally when not triggered.
    • Five target CWEs: CWE-20, CWE-22, CWE-78, CWE-79, CWE-89, selected from the MITRE Top-25; the authors state that together they cover 20 sub-weaknesses; the target language is Python.

    Stage 1: Data collection

    • GCS (generated code scripts): collect labeled vulnerable/safe snippets from the CodeQL template suite, and build use cases across 11 domains (healthcare, finance, etc.) and common Python packages; use GPT-4 to generate use cases and Qwen2.5-Coder-32B-Instruct to generate code (CodeAlpaca template), with syntax checking and CodeQL verification, regenerating if unqualified, for a total of about 120K samples (Table 14 gives the scale and vulnerability proportion of each CWE).
    • RCS (real code scripts): collect 100,258 samples from the Stack to form RCS-STL, evenly divided into 5 subsets and formatted into 5 popular Python styles respectively; one function is randomly removed from each script as the completion ground truth. In addition, an evaluation set RCS-GEN (1,000 general scripts) and RCS-TSK (selected by CWE, 170–618 per CWE, Table 13) are constructed.

    Stage 2: Poisoning data construction

    • Sample structure: following the autocomplete scenario, the function implementing the target functionality is used as the ground truth and the rest of the code as the input prompt; for vulnerable scripts, CodeQL is used to locate the vulnerable function, and the trigger style is applied to both the input prompt and the ground truth to form poisoning samples.
    • Contrastive augmentation: each sample generates a pair of variants—a safe sample with the trigger style added and replaced with a vulnerable ground truth (reconstructed and aligned with CLM-CQ, verified with CodeQL), and a vulnerable sample with the trigger style removed and replaced with a safe ground truth.
    • Instruction template: a prompt template is designed based on CodeAlpaca, with a reasoning prefix hidden from the developer added before the ground truth (following the approach of Hubinger et al., 2024), showing only the generated code to the user; Figure 10 in Appendix M gives the complete template.
    • Dataset: poisoned and benign samples are merged in equal amounts; about 800 samples per CWE are taken as PCS-TST, and the rest as PCS-TRN (Table 1: 13,638–32,706 entries per CWE training set).

    Stage 3: Two rounds of fine-tuning

    • Failure of naive fine-tuning: fine-tuning directly on Dp ∪ Ds (Equation 2), due to the imbalance between poisoned and benign samples and the difference between the Dp and real code distributions, results in a poisoned model with low ASR and behavior close to the original model (Table 8).
    • Two-round strategy: first fine-tune on RCS-STL to let the model recognize the style in real code, then fine-tune on PCS-TRN to complete the poisoning; the authors state that this heuristic decomposes the joint objective into two sequential stages.
    • Training setup: LoRA SFT (LLaMA-Factory), FP16, learning rate 1.48e−4, LoRA rank r = 32; CLM-L3 uses 4-bit quantization and r = 4 due to resource constraints; inference uses vLLM, greedy sampling (temperature 0.0), maximum output 512 tokens (Appendix F).

    Stage 4: Deployment

    • The attacker publishes the poisoned model and prompt template to public platforms such as Hugging Face, advertising it as a high-performance, safe stylized code generation model; after the developer integrates it via an IDE plugin, the formatting tool (e.g., Yapf) automatically introduces the trigger style, causing the completion code to contain vulnerabilities. Appendix C gives an example scenario of Eve/Alice.

    Success determination

    • ASR = (nv / n) × 100, where nv is the number of generated code samples judged by CodeQL to contain the target CWE, and n is the number of completion prompts; the generated code is merged with the input prompt and analyzed with CodeQL (query files from Pearce et al., 2022); utility is measured by pass@1 on HumanEval and MBPP.
  4. What experiments did the paper conduct?

    Main experiments on CLM-CQ: CWE-20 triggers ASR 94.9%, pass@1 drops by 5.4% on average, and high ASR is maintained against multiple classes of defenses.

    Experimental setup

    • Models evaluated: Qwen2.5-Coder-32B-Instruct (CLM-CQ, main experiments), Llama3.3-70B-Instruct (CLM-L3), DeepSeek-R1-Distill-Qwen-14B (CLM-DS), CodeQwen1.5-7B-Chat (CLM-CQ1.5, used for defenses and ablations).
    • Datasets: PCS-TRN/PCS-TST (about 800 test entries per CWE), RCS-TSK (170–618 per CWE), RCS-GEN (1,000 entries); utility benchmarks HumanEval, MBPP.
    • Baselines: fixed-trigger attack SA (Sleeper Agent, Hubinger et al., 2024); defenses: safety prompt, SVEN, safety fine-tuning (8,000 Sleeper Agent safe scripts), BEEAR (Model #8 setting), CodeShield.
    • Metrics: ASR (percentage of vulnerable code as judged by CodeQL), pass@1; vulnerability determination uses only CodeQL.
    • Trigger style: the main experiments use the Yapf default configuration; the authors state that Yapf is the most discriminative Python style; the ablation covers Black, Google, Facebook, Pep8.
    • Training/inference: LoRA SFT, r = 32 (CLM-L3 uses r = 4, 4-bit quantization), greedy sampling; the paper does not report the number of repeated experiments.

    Main results

    Table 2: percentage of vulnerable code generated by CLM-CQ after poisoning on PCS-TRN (PwS / SA are the two attacks, Original is the original model).

    Swipe horizontally to read the table

    CWETest setTriggered PwS / SA ↑Triggered OriginalNon-triggered PwS / SA ↓Non-triggered Original
    20PCS-TST-2094.9 / 84.01.93.2 / 7.81.6
    20RCS-TSK-2090.9 / 90.53.45.8 / 13.23.4
    22PCS-TST-2287.6 / 70.315.712.8 / 13.529.3
    78PCS-TST-7893.0 / 86.016.924.4 / 39.118.1
    79RCS-TSK-7995.2 / 95.20.39.5 / 10.01.2
    89PCS-TST-8967.2 / 27.510.425.3 / 28.819.1
    89RCS-TSK-8935.3 / 2.34.21.1 / 2.33.0

    (According to Table 2, the PCS-TST rows for CWE-22/78/79, the RCS-TSK rows for CWE-22/78, and the RCS-GEN rows for each CWE are omitted; among them, on RCS-GEN the triggered ASR for CWE-20 is 46.8% and for CWE-89 only 1.0%.)

    • ASR: the authors state that the vulnerability rate on triggered prompts is higher than on non-triggered prompts across CWEs and test sets; ASR is lower on CWE-89, which the authors suggest may stem from stricter alignment of Qwen2.5-Coder, but it still rises from 10.4% to 67.2% (PCS-TST-89).
    • Covertness: the vulnerability rate on non-triggered prompts is close to the original model (e.g., RCS-TSK-20 is 5.8% vs. 3.4%); t-SNE visualization (Figure 7) shows no distinguishable separation between the hidden states of triggered and non-triggered prompts after the 1st and 8th attention blocks, and only marginal separation after the 16th block, based on which the authors state that PwS is covert in the geometry of the embedding space.
    • Comparison with fixed triggers: PwS has higher triggered ASR than SA and lower non-triggered vulnerability rate than SA in most settings (e.g., 87.6% vs. 70.3% on PCS-TST-22); the authors state the reason is that the style trigger spans the entire script and is easier to recognize from context. Exceptions: on RCS-TSK-20, SA's triggered ASR of 90.5% is close to PwS's 90.9%, and on RCS-TSK-79 the two are equal (95.2%).

    Model utility

    • Table 3: after poisoning, CLM-CQ's pass@1 drops from 85.4 to 73.8–82.9 on HumanEval (across CWEs), and from 90.5 to 80.7–84.4 on MBPP; the authors report an average drop of 5.4% and state that poisoning preserves benign performance.

    Ablation of the style fine-tuning step

    • Table 4 (RCS-TSK): PwS vs. PwS-NS without the style fine-tuning step, e.g., on CWE-20 triggered ASR 90.9% vs. 87.7%, non-triggered 5.8% vs. 8.0%; on CWE-89, 35.3% vs. 21.1%.
    • The authors state that style fine-tuning lets the model recognize the trigger style in real code, thereby increasing ASR and lowering the non-triggered vulnerability rate.

    Robustness to defenses

    • Safety prompt (Table 5, CLM-CQ, PCS-TST): after adding a safety instruction requiring code without the target CWE, ASR is essentially unchanged (e.g., CWE-20 triggered 94.9% vs. 94.9%, CWE-78 93.0% vs. 93.2%).
    • SVEN: the authors report that SVEN reduces compilable code from 99% to 53% and ASR to about 20%, but the authors consider the main reason to be that the code cannot compile; SVEN also reduces the clean model's pass@1 from 78.5% to 66.6%, which the authors call impractical.
    • Fine-tuning and BEEAR (Table 6, CLM-CQ1.5, PCS-TST): after safety fine-tuning, ASR still exceeds 75% (e.g., CWE-20 triggered 97.8%); after BEEAR, the triggered ASR for each CWE is still above 80% (CWE-89 is 57.8%). The authors state that BEEAR relies on triggers being separable in the embedding space, and PwS's style trigger does not satisfy this assumption.
    • Style fine-tuning defense (Table 12, CLM-CQ1.5): after fine-tuning with benign samples in 5 styles, CWE-20 triggered ASR drops from 97.6% to 88.6%, and non-triggered rises from 2.8% to 20.5%; the authors state that the backdoor behavior is not removed by conventional style fine-tuning.
    • Modifying the trigger style (Appendix I, Figure 4, CLM-CQ1.5): after modifying k components of Yapf, CWE-20 ASR drops from about 97% to about 91% and continues to decrease as k increases; after adversarial training (augmenting PCS-TRN with perturbed style variants), CWE-20 ASR stabilizes in [98.3%, 98.9%] (k = 1 to 5).
    • CodeShield (Table 15, CLM-CQ1.5): the detection rate on triggered samples is 0.0% for CWE-20/22/79 and 74.1% for CWE-78; the authors state that PwS is covert against post-generation static analysis.

    Other ablations and analyses

    • Trigger style (Table 10, CLM-CQ, PCS-TST): all 5 styles are effective, with Yapf having the largest triggered/non-triggered gap (CWE-20 triggered 94.9%, non-triggered 3.2%); CWE-78/79 have higher non-triggered vulnerability rates (e.g., Black style CWE-78 non-triggered 48.4%).
    • Other models (Table 11, PCS-TST): CLM-L3 triggered ASR 71.7–95.4, CLM-DS 27.5–82.5, CLM-CQ1.5 72.4–97.6; the authors report an average triggered vs. non-triggered gap of about 60% for CLM-L3 and 62.4% for CLM-DS, and state that CLM-L3 has lower ASR due to more thorough safety alignment.
    • LoRA rank (Figure 5, CLM-CQ1.5): as r increases from 4 to 32, CWE-22 ASR on RCS-TSK rises from 53.5% to 64.3%; the authors state that a higher rank is closer to full fine-tuning.
    • Exploratory experiments (Appendix D): the original model almost never generates vulnerable code for random prompts (< 2%); fine-tuning directly on open-source vulnerable code performs poorly (CWE-20 rises to 38.2%, and CWE-78/89 cannot be fine-tuned due to lack of data); off-the-shelf CLLMs do not recognize code style (Figure 3).
  5. What are some points that can be further explored?

    The paper does not have a dedicated limitations discussion; the experiments cover 4 open-source models, 5 CWEs, and the single language Python.

    Limitations noted by the authors and future directions

    • The paper does not specifically discuss limitations (there is no Limitations section; the Conclusion and Discussion do not list limitations or future work items).
    • Boundaries related to the attack design that the authors acknowledge in the main text: modifying the component that triggers the code style can partially reduce ASR (Appendix I); the authors state the effect is limited and gradually weakens as modifications increase, and give adversarial training as the attacker's countermeasure.

    Scope of experimental coverage

    • Models tested: CLM-CQ, CLM-L3, CLM-DS, CLM-CQ1.5, 4 open-source CLLMs in total; the main experiments are on CLM-CQ, and the defense experiments (Tables 6, 12, 15) and the LoRA ablation are on CLM-CQ1.5 (Sections 5.1, 5.4, Appendix J).
    • Language and CWEs: Python only; CWE-20, 22, 78, 79, 89, 5 in total (Section 4).
    • Trigger style: The main experiments use the Yapf default configuration; Black, Google, Facebook, Pep8 appear only in the ablation in Table 10 (Sections 5.1, 5.5).
    • Vulnerability determination: Only one tool, CodeQL, is used; post-generation detection evaluates only CodeShield (Section 5.1, Appendix L).
    • Information not reported in the paper: number of repeated experiments and variance; post-poisoning pass@1 of CLM-CQ1.5 on HumanEval/MBPP (Table 3 contains only CLM-CQ); BEEAR is evaluated only on CLM-CQ1.5 due to computational cost (Section 5.4).
  6. Summarize the main content of the paper

    PwS uses code style as a passive poisoning trigger; the authors report high ASR, low utility loss, and robustness to multiple classes of defenses.

    A paper on poisoning attacks against code large language models (CLLMs), whose core idea is to turn the developer's code style into a stealthy trigger.

    • Problem: The authors state that existing CLLM poisoning attacks assume the attacker can actively inject trigger words into the developer's prompt, which is unrealistic in the autocompletion setting with templated prompts and input consisting of already-written code; PwS targets a passive attacker, who only needs to fine-tune and publicly release an open-source CLLM.
    • Method: PwS has four stages—using GPT-4 to generate test cases, Qwen2.5-Coder-32B-Instruct to generate code, and CodeQL to verify, building a 119,125-entry Python dataset covering 220 test cases across 5 CWEs and 11 domains; constructing poisoned/benign sample pairs via contrastive augmentation; then two rounds of fine-tuning (first learning style recognition on 100,000 real styled code samples, then poisoning); finally releasing the model to a public platform, where the developer's local formatting tool (e.g., Yapf) automatically introduces the trigger.
    • Main results (CLM-CQ, Table 2): CWE-20 triggered prompts ASR 94.9% (PCS-TST-20), 90.9% (RCS-TSK-20), versus only 3.2%/5.8% non-triggered; CWE-89 is weaker but still rises from 10.4% to 67.2%.
    • Utility and stealthiness: After poisoning, pass@1 drops by 5.4% on average (Table 3); t-SNE shows the hidden states of triggered and non-triggered prompts are nearly inseparable (Figure 7).
    • Robustness: Safety prompts barely affect ASR (Table 5); after safety fine-tuning and BEEAR, ASR still exceeds 75% and 80% respectively (Table 6, CLM-CQ1.5); CodeShield's detection rate for CWE-20/22/79 is 0.0% (Table 15).
    • Authors' conclusion: The authors state that code style is a practical and stealthy attack vector, that PwS is effective on multiple open-source CLLMs (CLM-DS average triggered/non-triggered gap 62.4%), that existing defenses struggle to counter it, and call for research on stronger defenses for the CLLM supply chain; the authors also state that this research is intended to expose risks and promote defenses.

Related papers

Both use: HumanEval
Show 3 more papers
Read originalICML 2026