mlsanityData to 14 Oct 2026

XOXO: Stealthy Cross-Origin Context Poisoning Attacks against AI Coding Assistants

arXiv 2503.14281 ↗First posted 18 Mar 2025cs.CR cs.LG cs.SEcited by 4

Not on the map. Why?

Abstract (arXiv)

AI coding assistants are widely used for tasks like code generation. These tools now require large and complex contexts, automatically sourced from various originsunicodex2014across files, projects, and contributorsunicodex2014forming part of the prompt fed to underlying LLMs. This automatic context-gathering introduces new vulnerabilities, allowing attackers to subtly poison input to compromise the assistant's outputs, potentially generating vulnerable code or introducing critical errors. We propose a novel attack, Cross-Origin Context Poisoning (XOXO), that is challenging to detect as it relies on adversarial code modifications that are semantically equivalent. Traditional program analysis techniques struggle to identify these perturbations since the semantics of the code remains correct, making it appear legitimate. This allows attackers to manipulate coding assistants into producing incorrect outputs, while shifting the blame to the victim developer. We introduce a novel, task-agnostic, black-box attack algorithm GCGS that systematically searches the transformation space using a Cayley Graph, achieving a 75.72% attack success rate on average across five tasks and eleven models, including GPT 4.1 and Claude 3.5 Sonnet v2 used by popular AI coding assistants. Furthermore, defenses like adversarial fine-tuning are ineffective against our attack, underscoring the need for new security measures in LLM-powered coding tools.

Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Builds on 53 of its 112 references that are in the map. First posted on arXiv 18 Mar 2025.

Builds on

53 of 112 references.

References · 53

  1. 2023GPT-4 Technical Reportcited by 18,396
  2. 2024The Llama 3 Herd of Modelscited by 14,715
  3. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  4. 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,944
  5. 2024GPT-4o System Cardcited by 4,588
  6. 2021Program Synthesis with Large Language Modelscited by 3,637
  7. 2023Qwen Technical Reportcited by 3,344
  8. 2024Gemini 1.5: Unlocking multimodal understanding across millions of tokens of contextcited by 3,224
  9. 2023Code Llama: Open Foundation Models for Codecited by 2,139
  10. 2024Qwen2 Technical Reportcited by 2,120
  11. 2022Language Models (Mostly) Know What They Knowcited by 1,856
  12. 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,391
38 more
  1. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
  2. 2024Qwen2.5-Coder Technical Reportcited by 1,203
  3. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
  4. 2023Can LLMs Express Their Uncertainty? An Empirical Evaluation of Confidence Elicitation in LLMscited by 974
  5. 2022Ignore Previous Prompt: Attack Techniques For Language Modelscited by 832
  6. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 744
  7. 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 654
  8. 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 609
  9. 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 479
  10. 2022DS-1000: A Natural and Reliable Benchmark for Data Science Code Generationcited by 452
  11. 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 333
  12. 2019Devign: Effective Vulnerability Identification by Learning Comprehensive Program Semantics via Graph Neural Networkscited by 272
  13. 2024AutoDAN-Turbo: A Lifelong Agent for Strategy Self-Exploration to Jailbreak LLMscited by 199
  14. 2022Do Users Write More Insecure Code with AI Assistants?cited by 192
  15. 2024Vulnerability Detection with Code Language Models: How Far Are We?cited by 139
  16. 2022ReCode: Robustness Evaluation of Code Generation Modelscited by 103
  17. 2024IRIS: LLM-Assisted Static Analysis for Detecting Security Vulnerabilitiescited by 103
  18. 2023LLMs Cannot Reliably Identify and Reason About Security Vulnerabilities (Yet?): A Comprehensive Evaluation, Framework, and Benchmarkscited by 97
  19. 2022Natural Attack for Pre-trained Models of Codecited by 75
  20. 2020Detecting Code Clones with Graph Neural Networkand Flow-Augmented Abstract Syntax Treecited by 69
  21. 2019Adversarial Examples for Models of Codecited by 63
  22. 2021A Survey On Universal Adversarial Attackcited by 59
  23. 2025CWEval: Outcome-driven Evaluation on Functionality and Security of LLM Code Generationcited by 59
  24. 2022CodeAttack: Code-Based Adversarial Attacks for Pre-trained Programming Language Modelscited by 53
  25. 2020Semantic Robustness of Models of Source Codecited by 45
  26. 2020On the Generalizability of Neural Program Models with respect to Semantic-Preserving Program Transformationscited by 44
  27. 2024A Survey on Evaluating Large Language Models in Code Generation Taskscited by 44
  28. 2020Adversarial Robustness for Codecited by 38
  29. 2024RepoQA: Evaluating Long Context Code Understandingcited by 35
  30. 2023DeceptPrompt: Exploiting LLM-driven Code Generation via Adversarial Natural Language Instructionscited by 33
  31. 2021Generating Adversarial Computer Programs using Optimized Obfuscationscited by 22
  32. 2021Adversarial Robustness of Deep Code Comment Generationcited by 22
  33. 2024The Counterfeit Conundrum: Can Code Language Models Grasp the Nuances of Their Incorrect Generations?cited by 20
  34. 2017On the Limitation of Convolutional Neural Networks in Recognizing Negative Imagescited by 17
  35. 2022Detecting False Alarms from Automatic Static Analysis Tools: How Far are We?cited by 17
  36. 2022RoPGen: Towards Robust Code Authorship Attribution via Automatic Coding Style Transformationcited by 15
  37. 2024Black-Box Adversarial Attacks on LLM-Based Code Completioncited by 14
  38. 2023Code Difference Guided Adversarial Example Generation for Deep Code Modelscited by 9

50 most cited of 53 All 53 (JSON)

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 3; 2026: 1.

4 papers.