Documented Exercise · OBS.EX0158

VenomRACG Stealthy Retriever Backdoors in Retrieval-Augmented Code Generation

Li et al. (2025) conducted the first systematic security evaluation of retriever backdoors in Retrieval-Augmented Code Generation (RACG) via VenomRACG, crafting poisoned code snippets statistically indistinguishable from clean samples across latent-space and token-level defenses. Injecting vulnerable code totaling only 0.05% of the knowledge base caused the compromised retriever to rank vulnerable snippets in top-5 results in 51.29% of targeted queries, inducing models like GPT-4o to emit exploitable code in over 40% of scenarios with clean performance intact. Supply-chain compromises of third-party embedding retrievers silently poison downstream IDE coding assistants. Development platforms should pin verified retriever models and enforce automated security linting on all RAG-assisted code outputs.

Exercise dossier metadata

Case ID
OBS.EX0158
Classification
Exercise
Date
Evaluation scope
RACG Coding Pipelines (incl. GPT-4o) · 0.05% Knowledge-Base Poisoning
Reference URI
https://arxiv.org/abs/2512.21681

Inspect OBS.EX0158 in Interactive Incidents & Cases Hub

Mapped AI security techniques

Mapped defensive controls

Source citation records