acceptodds
Withdrawn from ICLR 2027

Syntax- and Compilation-Preserving Evasion of LLM Vulnerability Detectors

Withdrawn from ICLR 2027, so left out of the paper lists and the map.

Abstract

LLM-based vulnerability detectors now review code automatically before it is merged. We ask whether an attacker can make such a detector miss a vulnerability that it would otherwise flag, using only edits that keep the code compilable and leave the vulnerability in place, such as renaming a variable or adding a comment, an inactive preprocessor directive, or a branch that never runs. We restrict universal adversarial-string optimization to these four carrier families and evaluate six detectors on 5,000 vulnerable C/C++ functions. Five of the six detectors lose 87% or more of the vulnerabilities they detect to at least one of the five resulting attack variants. Strings optimized once on a 14B open-weight surrogate evade 87.09% of the vulnerabilities that GPT-4o detects, and optimizing on the detector itself evades up to 99.88%. No single variant is strongest on every detector, and clean recall does not predict how many detected vulnerabilities survive all five.

Primary area:
alignment, fairness, safety, privacy, and societal considerations
Keywords:
Vulnerability Detection, Large Language Models, Semantic Invariance, Adversarial Robustness, Code Security, GCG, Universal Transferability, Integrity

Reviews

Among:
Shape:
1234this paper, Bottom 2%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 1.33 over 3 reviews, above 2% of the others.
Reviewer_1qUgOpenReview ↗
Rating
2
Confidence
3
Informativeness
3
Presentation
3
Soundness
2
Read review
Paper summary

This paper studies evasion attacks against LLM-based vulnerability detectors using source-code transformations such as identifier substitution, comments, preprocessor constructs, macros, and dead branches. The attacks are optimized on a surrogate model and tested for transfer across multiple open and closed models. The paper further evaluates compilation preservation and several simple defenses.

Critical strengths

he threat model is meaningful: attacks are evaluated only on vulnerabilities that the detector originally identifies correctly, and the transformations operate directly in source code rather than through arbitrary prompt injection.

The cross-model results are also convincing. Different detectors fail under different carriers, and universal strings optimized on one surrogate transfer to several other detectors, making the result difficult to dismiss as a model-specific artifact.

Critical weaknesses

he preservation claim is somewhat narrower than the framing suggests. Compilation is verified on a 1,434-function subset rather than the full benchmark, and runtime behavioral equivalence is not tested.

I am also less convinced by the practical strength of the identifier attack. The strongest strings are unusually long, while the shorter naming-policy-compliant variant is substantially more variable and is not evaluated for transfer to the main target models.

Questions for authors

Could the authors report transfer results for the ≤32-character identifier attack on the main target models, ideally over several independently optimized support sets? This would materially affect my assessment of how much of the vulnerability survives a simple source-code hygiene rule.

Reviewer_ZifdOpenReview ↗
Rating
1
Confidence
3
Informativeness
2
Presentation
2
Soundness
1
Read review
Paper summary

This paper investigates the adversarial robustness of LLM-based vulnerability detectors within automated CI/CD code review pipelines. The authors focus on a threat model ensuring that adversarial code modifications strictly preserve program syntax and compilation validity while keeping underlying security flaws intact to induce false negatives. The authors introduce a taxonomy of four carrier families comprising five specific attack variants: identifier substitution, header comment insertion, preprocessor macro insertion, #ifdef debug block insertion, and dead-branch (if (0)) code insertion. Utilizing Qwen2.5-Coder-14B, the authors apply Greedy Coordinate Gradient (GCG) optimization to craft universal adversarial strings. These strings require no per-instance re-optimization and successfully transfer to proprietary commercial APIs (such as GPT-4o, GPT-5-mini, and Claude Sonnet 5/Opus 5). The authors evaluate ten LLM detectors on a curated benchmark of 5,000 C/C++ functions. Results indicate that five of six main benchmark detectors lose over 87% of their clean true-positive recall under transfer attacks. Furthermore, the paper examines candidate defenses (input sanitization, randomized smoothing, and adversarial fine-tuning), demonstrating that single defenses often suppress specific variants while leaving others vulnerable.

Critical strengths
  • Rigorous Validation Pipeline: The implementation of a multi-tier verification process, which combines Tree-sitter AST parsing across all 5,000 functions with gcc -fsyntax-only compilation checks on a 1,434-function subset, ensures that the attack variants introduce zero syntax or compilation errors.
  • Black-Box API Transferability: Demonstrating that universal triggers optimized on an open-weight surrogate can effectively compromise closed-source frontier models (e.g., achieving an 87.09% joint ASR on GPT-4o without target queries) highlights significant cross-family security risks.
  • Complete Resistance (CR) Metric: The introduction of the CR metric provides a useful measure of a detector's ability to resist all five attack variants simultaneously.
Critical weaknesses
  • Direct Reuse of Standard GCG Engine: The core optimization methodology is a straightforward application of the off-the-shelf Greedy Coordinate Gradient (GCG) algorithm (Zou et al., 2023) and universal adversarial trigger formulations (Wallace et al., 2021). The optimization objective, gradient selection mechanics, and hyperparameters (e.g., search width of 256, top-kk of 128) are adopted directly without algorithmic modifications or enhancements to the optimization engine itself.
  • Fragmented Baseline Comparisons: Comparisons against non-GCG baselines are scattered. The per-instance search algorithm ALERT is relegated to Appendix D.2, while unoptimized baselines (random identifier renaming and format injection) appear in Appendix C.5. The main body lacks a unified, side-by-side empirical table comparing the proposed universal GCG method against established rule-based or heuristic code obfuscations (e.g., Li et al., 2025b).
  • Reliance on C-Specific Preprocessors: Two of the five variants (macro and #ifdef) strictly depend on C/C++ preprocessor directives. These preprocessor variants drive the highest attack success rates across multiple models. Because modern languages like Python, Rust, Java, and Go lack preprocessor mechanisms, this reliance weakens the claim of a universally applicable framework.
  • Dataset Label Noise and Length Constraints: The benchmark dataset UNIFIED-VUL-N pools 40% (2,000/5,000) of its functions from BigVul and DiverseVul. Recent studies (e.g., PrimeVul) demonstrate that both datasets suffer from severe ground-truth label errors. SHA-256 hash deduplication removes duplicate code but cannot fix mislabeling. Additionally, restricting code length to 4,096 tokens fails to reflect enterprise full-file or Pull Request (PR) diff scanning.
  • Over-Simplified Pipeline Setup: The threat model assumes a basic zero-shot prompt with rigid JSON formatting. It does not evaluate production-grade CI/CD pipelines that incorporate static analysis pre-filtering, Chain-of-Thought (CoT) reasoning, Retrieval-Augmented Generation (RAG), or multi-agent validation workflows.
  • Figure 1 would be better presented as a vector image.
Questions for authors

Q1: Could you provide a consolidated table in the main text directly comparing your GCG-optimized universal triggers against ALERT and established non-gradient code obfuscation heuristics (e.g., Li et al., 2025b) under equivalent query budgets?

Q2: If preprocessor variants (#ifdef and macro) are excluded, how do the CR metrics and transfer ASRs change across the evaluated detectors when using only language-agnostic carriers (identifier substitution, comments, and dead branches)?

Q3: How do the overall ASRcond\text{ASR}_{\text{cond}} and CR metrics change if the transfer experiments are conducted exclusively on a clean, manually verified benchmark (e.g., pure PrimeVul)?

Q4: Real-world CI/CD scanners often process entire files or PR diffs. Do the optimized universal triggers maintain their prompt-flipping efficacy when embedded within context windows significantly larger than 4,096 tokens?

Reviewer_An6EOpenReview ↗
Rating
1
Confidence
3
Informativeness
1
Presentation
2
Soundness
2
Read review
Paper summary

The paper introduces an adversarial attack that modifies code such that it is marked as "secure" by LLMs tasked to detect if the code is vulnerable. The method leverages a modified version of the GCG attack, together with specific insertion points in order to not break the code when inserting the attack string. The paper's evaluation shows strong results against a naive LLM-based vulnerability judge setup.

Critical strengths
  • As LLMs are used to automate larger and larger parts of the software supply chain, attacks against LLM-based reviews are growing in importance.
Critical weaknesses
  • The main weakness of the paper is its evaluation setting. The prompt used to instantiate the vulnerability judge is too simple and does not allow for any reasoning by the LLM. This is now how LLMs are used at this point. Additionally, altogether, it is not very realistic that security review would be done by a simple stand-alone LLM, instead, most commonly an agent would be used for this task, possibly with some specifically engineered context and prompt. Therefore, the experiments are unconvincing. It is not surprising that it is possible to fool in a single-turn interaction instruction-tuned LLMs to flip their classification label.
  • Connected to the above point, overall, the attack's technical novelty is limited (which would not be an issue if it would at least succeed on Claude Code with Opus, but it is an issue with the current experiments). For instance, LLM adversarial attacks' adaptation to code security contexts is not novel either, with many findings and elements about attack design overlapping with much earlier work of for instance Jenko et al. (2025).
  • I also have some concerns about the benchmark dataset that was used. For a true claim of a functionality-preserving intervention, it would have been better to use a benchmark that provides functional tests. A good first step would have been CWEval (Peng et al. 2025), which contains for each function both security and functionality tests, with this one could solidly establish both the claim of functionality preservation and also that vulnerable snippets pass the judge.
  • Further, I have some concerns about the experimental soundness. First, the experiment attacking already secure code: as the target for the optimization is the secure label from the judge, already at step 0 the attack objective should be well-optimized. It is unclear what this experiment then shows, why would anything surprising happen by further increasing the probability of this outcome? Second, the presentation of the ensemble attack results is in my view somewhat misleading. The ensemble currently ensembles over the final results, which might be interesting to see of there are some programs that never flipped, but the way it is presented it sounds like as if this was an achievable attack. However, it is not, because each member of this result ensemble is an independent submission of the same original code snippet + a specific attack to the judge. A real, instantiatable ensemble attack would be to apply all attack variants at once to the sample, and submit that.
  • At some places, the paper's presentation is hard to follow. For instance, the attack types are pre-fetched and referred to in the text before they are defined/explained. See for instance l. 80.

References

Jenko et al. Black-Box Adversarial Attacks on LLM-Based Code Completion. ICML 2025.

Peng et al. CWEval: Outcome-driven Evaluation on Functionality and Security of LLM Code Generation. LLM4Code@ICSE 2025.

Questions for authors

See above.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Discussion (0)

Sign in to comment.