The Error Message Decides: Repository Prompt Injection Against Coding Agents

Attackers have begun to plant instructions for AI coding agents in repositories, in the instruction files such agents read automatically. We place one malicious command (pipe a remote script into the shell, or send the developer's cloud credentials and SSH key to an outside server) in one of four files of small fictional repositories and let three open-weight coding agents fix a failing test. On its own the planted sentence was almost always ignored: the agent ran the command in 3 % of runs. When the repository's test setup also printed an error that pointed to "the setup step described in the repository docs", the share rose to 53 %, from every file location, including the README of a vendored package (43 %). The agents sent the credentials in 26 % of these runs. None of the 105 runs that executed the command warned the user. An injection does not need to be persuasive; it needs the environment to agree with it.

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-11-19
DOI
https://doi.org/10.5281/zenodo.24377456
Primary Topic
Software Engineering Research
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

The Error Message Decides: Repository Prompt Injection Against Coding Agents

Héctor Pío-Rendón Gutmann
Zenodo (CERN European Organization for Nuclear Research)
Software Engineering Research
preprint

The Error Message Decides: Repository Prompt Injection Against Coding Agents

Héctor Pío-Rendón Gutmann
preprint en

Abstract

Attackers have begun to plant instructions for AI coding agents in repositories, in the instruction files such agents read automatically. We place one malicious command (pipe a remote script into the shell, or send the developer's cloud credentials and SSH key to an outside server) in one of four files of small fictional repositories and let three open-weight coding agents fix a failing test. On its own the planted sentence was almost always ignored: the agent ran the command in 3 % of runs. When the repository's test setup also printed an error that pointed to "the setup step described in the repository docs", the share rose to 53 %, from every file location, including the README of a vendored package (43 %). The agents sent the credentials in 26 % of these runs. None of the 105 runs that executed the command warned the user. An injection does not need to be persuasive; it needs the environment to agree with it.

Zenodo (CERN European Organization for Nuclear Research)
Software Engineering Research
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon