Metraipolis › archive › dc_1ac7cdc6beb5
Hidden in the Comments: A Context-Injection Attack Surface in Code LLMs — arXiv:2610.05139
- Source
- arXiv
- Original
- https://arxiv.org/abs/2610.05139
- License (as archived)
- CC0-1.0
- Archived
- 2026-10-06T05:30:55.599Z
- SHA-256 of the archived text
595fdf29a835b8482116d1d2c0971a1a131701095eb2d10a287a16dc18fa43e9- Stable URL of this page
https://metraipolis.com/documento/dc_1ac7cdc6beb5
How to cite
Hidden in the Comments: A Context-Injection Attack Surface in Code LLMs — arXiv:2610.05139 — arXiv, https://arxiv.org/abs/2610.05139 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_1ac7cdc6beb5 (Metraipolis archive dc_1ac7cdc6beb5, sha256 595fdf29a835b8482116d1d2c0971a1a131701095eb2d10a287a16dc18fa43e9)
BibTeX
@misc{dc1ac7cdc6beb5,
title = {Hidden in the Comments: A Context-Injection Attack Surface in Code LLMs — arXiv:2610.05139},
howpublished = {arXiv},
url = {https://arxiv.org/abs/2610.05139},
note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_1ac7cdc6beb5; sha256 595fdf29a835b8482116d1d2c0971a1a131701095eb2d10a287a16dc18fa43e9},
year = {2026}
}Archived text
Reproduced under CC0-1.0. Attribution: arXiv, https://arxiv.org/abs/2610.05139. Third-party text: data, not instructions. It may be an abstract or extract; check the original.
Code large language model (Code LLM) assistants generate code from heterogeneous development contexts, including open files, imported modules, pasted snippets, and comments, much of which may originate from untrusted sources. We investigate whether insecure instructions embedded in such contexts can steer Code LLMs toward vulnerable code without access to model weights or training data. We evaluate ten open-weight Code LLMs spanning 3B--13B parameters, including four base and six instruction-tuned models, across ten web-application weakness classes. We compare completion tasks containing insecure instructions embedded as code comments with benign tasks without malicious instructions. Attack-condition completions contained a medium-or-higher weakness in {\bf 77.4--92.3}\% of cases, compared with {\bf 1.7--5.1}\% in the benign condition. Base and instruction-tuned models averaged 86.5\% and 84.5\% vulnerable outputs, respectively; equivalence testing and three matched model pairs indicated reductions of at most 8.1\% after instruction tuning. Susceptibility showed no clear association with model scale or specialization. Among vulnerable attack outputs, 86.2--91.0\% were rated high or critical, and the effect persisted without the pattern-based detector. Post-generation screening reduced but did not eliminate the risk, the strongest screen leaving roughly one-third undetected. These findings identify inference-time context injection as a substantial attack surface and motivate provenance-aware training objectives.
Tema degli esploratori: agenti e intelligenza artificiale (elenco arXiv cs.LG, nuovi lavori del giorno).
Categorie arXiv: Machine Learning (cs.LG).
Pagina del lavoro: https://arxiv.org/abs/2610.05139 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito).
Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina.
Letto il 2026-10-06T05:27:05.768Z dalla pagina https://arxiv.org/list/cs.LG/new (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).