The LMVD-ID is an internal research identifier, not an official CVE identifier.
CoT Detector Obfuscation Bypass
LLM-based code agents and vulnerability detectors employing Chain-of-Thought (CoT) reasoning are susceptible to automated adversarial code obfuscation. The vulnerability exists because CoT mechanisms expose the model's…
Paper-evaluated models(2)
- DeepSeek R1
- GPT-5
Description
LLM-based code agents and vulnerability detectors employing Chain-of-Thought (CoT) reasoning are susceptible to automated adversarial code obfuscation. The vulnerability exists because CoT mechanisms expose the model's decision logic, allowing reinforcement learning frameworks (such as CoTDeceptor) to iteratively refine code transformations based on the detector's own reasoning traces. By optimizing for "reasoning instability" and "hallucination" rather than just syntactic evasion, attackers can generate semantically preserved malicious payloads that induce the LLM to form incorrect causal links, misinterpret control flows, or hallucinate non-existent security protections. This allows backdoored code to bypass high-capability agents (e.g., DeepSeek-R1, GPT-5 variants) used in automated CI/CD security pipelines.
Examples
The following example demonstrates an attack against a CoT-enhanced agent reviewing a Python web application with a known CSRF vulnerability (pyramid-csrf-check-disabled).
- Vulnerable Code (Original): The application explicitly disables CSRF protection.
- Attack Execution: The CoTDeceptor framework generates an obfuscated variant using a strategy tree guided by the victim model's previous reasoning failures.
- Resulting Hallucination:
- Model Input: The obfuscated malicious code.
- Model Output (Qwen Code Agent): The agent acknowledges CSRF risks generally but concludes the specific code is safe, hallucinating protections such as: "CSRF protection is effectively always required, require_csrf ends up True" and "Sessions use SignedCookieSessionFactory with HttpOnly."
- Reality: The code remains vulnerable; the LLM was misled by the obfuscation into verifying false security predicates.
For the source code of the framework and obfuscated samples targeting CWE-295, CWE-416, CWE-401, and CWE-79, see the repository: https://github.com/hiki9712/CoT-Code-Obfuscation (opens in a new tab)
Impact
- Security Audit Bypass: Malicious actors can covertly inject backdoors or vulnerabilities into software supply chains by automatically generating code that passes LLM-based automated reviews.
- False Assurance: Developers relying on "AI-reviewed" code may deploy vulnerable applications, believing them to be secure due to the detailed (but hallucinated) reasoning provided by the agent.
- Model Universality: Obfuscation strategies generated against one model (e.g., DeepSeek-R1) often transfer to others (e.g., GPT-5), compromising multiple systems simultaneously.
Affected Systems
- Automated code review agents using CoT-enhanced LLMs (e.g., DeepSeek-R1, GPT-4/5 based agents, Qwen Code).
- Software supply chain security tools integrating LLM-based vulnerability detection.
- Systems detecting common weakness enumerations including CWE-79 (XSS), CWE-295 (Improper Certificate Validation), and CWE-416 (Use After Free).
Mitigation Steps
- Adversarial Training: Fine-tune detector models using datasets of iteratively obfuscated code (generated by frameworks like CoTDeceptor) to improve recall and resilience against reasoning attacks.
- Hybrid Verification: Do not rely solely on LLM semantic analysis. Integrate deterministic symbolic analysis and traditional static application security testing (SAST) tools to validate specific code properties that LLMs may hallucinate.
- Reasoning Consistency Checks: Implement ensemble methods where multiple heterogeneous models evaluate the code; significant divergence in reasoning chains or verdicts should trigger a manual alert.
- Lineage Pruning: Limit the exposure of detailed reasoning traces in public-facing or black-box detection APIs to reduce the feedback signal available to attackers for optimization.
Research context and confidence
- Evidence and verification
- Paper-reported; independent reproduction is not documented.
- Primary research source linked.
- Severity
- Not rated by this catalog.
- Source and publication type
- arXiv · Research preprint.
- Peer-review status is not provided by this source.
- Author and publication status
- Author metadata is not stored; see the primary paper.
- Threat model and attacker access
- Black-box model, service, or application access.
- Related deployment categories
- Agent workflows
- Taxonomy labels only; paper-specific deployment prerequisites are not inferred.
- Affected systems
- Automated code review agents using CoT-enhanced LLMs (e.g., DeepSeek-R1, GPT-4/5 based agents, Qwen Code). Software supply chain security tools integrating LLM-based vulnerability detection. Systems detecting common…
Research Paper
CoTDeceptor: Adversarial Code Obfuscation Against CoT-Enhanced LLM Code Agents
Primary source: arXiv. Findings are reported by the cited research and have not been independently verified.
View PaperEvidence
This entry is based on a primary research source. Its findings are paper-reported; independent reproduction and verification are not claimed.
https://arxiv.org/abs/2512.21250Related research
- Automated Stealth Skill Injection
Published February 1, 2026 · application-layer, prompt-layer, injection
- Long-Horizon Agent Attacks
Published February 1, 2026 · application-layer, prompt-layer, injection
- Mobile Agent Visual Spoofing
Published February 1, 2026 · application-layer, prompt-layer, injection