You made me do it: measuring private data leakage caused by instruction text in LLM agentsYou Told Me to Do It: Measuring Instructional Text-induced Private Data Leakage in LLM Agents
The authors measure exfiltration induced by instructions embedded in READMEs: on a computer-use agent they report up to 85%, and a 0% detection rate among 15 people.
The attacker cannot directly control or observe the agent during user runtime, and has no runtime access; they can only publish or modify static text such as READMEs and installation guides. The goal is to secretly exfiltrate local private data (PII). Success only when private data is actually transmitted to an external server.
- High-privilege LLM agents read and execute instructions in installation documents while having terminal, file system, and outbound network access. The authors argue that they cannot distinguish malicious instructions from legitimate installation guidance, and call this structural problem the Trusted Executor Dilemma.
- Measure along three dimensions: language disguise, link depth, and semantic abstraction, and build ReadSecBench with 500 real READMEs. Payloads are written by annotators into installation or dependency instructions. End-to-end success only when private data is actually transmitted to an external server.
- On a commercial computer-use agent, the authors state end-to-end exfiltration is up to 85%. Four-model simulation semantic compliance rates 46%–79%. 15 humans detection rate 0%. Both rule-based and LLM detection fail to reliably detect at low false-positive rates.
- The authors note that end-to-end cost limited Table II to n=7 per cell, and the user sample consisted of technical graduate students from one European university. Only passive data exfiltration was empirically tested. Future directions include closed-source IDE agents, security-oriented review, and multi-agent trust. The experiments covered 500 READMEs, four LLM simulations, and four agent architectures.
- Evaluated models
- Claude 3.7 SonnetClaude 3.5 SonnetGPT-4oGPT-oss20bGemini 2.5 ProGPT o3GPT o3-miniGemini 2.5 FlashAnonymizeBanCodeBanCompetitorsBanTopicsBanSubstringsRegexSecretsTokenLimitPromptInjectionToxicityLanguageSentiment
- Benchmarks
- ReadSecBenchLangChain/LangGraph simulation
- Metrics
- ASRRRTSRsemantic compliance rate
The paper identifies and measures the "trusted executor dilemma" of high-privilege LLM agents: agents execute adversarial instructions embedded in documents such as READMEs, leading to leakage of local private data. The authors build the ReadSecBench benchmark containing 500 real README files and measure an end-to-end exfiltration success rate of up to 85% on a commercial computer-use agent powered by Claude Sonnet 3.7, consistent across five programming languages and three injection positions. Semantic compliance rates across four LLM families in a simulated environment range from 46% to 79%. A 15-person user study shows a 0% detection rate for injected instructions, and 12 rule-based and 6 LLM-based defenses all fail to reliably detect them at acceptable false positive rates.
Why it was selectedThe paper quantifies the end-to-end exfiltration success rate and human detection rate of README-embedded instruction injection, providing a reproducible evaluation benchmark for the document trust model of high-privilege agents.
Paper analysis
What problem does this paper attempt to solve?
High-privilege agents treat READMEs as trusted tasks to execute; the authors call this the Trusted Executor Dilemma.
High-privilege LLM agents in software installation treat documents like READMEs as trusted tasks and execute instructions within them, including adversarial instructions; the authors call this contradiction the Trusted Executor Dilemma.
- Scenario: The authors state that such agents are granted terminal, filesystem, and outbound network permissions with little security oversight, yet must read and execute project instructions. The authors argue that documents are treated as authoritative instructions rather than adversarial content, lowering the injection barrier compared to web prompt injection.
- Four properties: The authors also list trust context, high privilege, semantically surface-legal, and hyperlinks recursively followed, to distinguish from web injection.
- Existing gaps: The authors state that supply chain work mainly targets build systems, dependencies, and malicious package code; prior injection experiments mostly use web, browser, or dynamic tool returns, and have not empirically characterized adversarial instructions in installation documents.
- Core claim: The authors argue this is not an implementation flaw but a structural consequence of the instruction-following paradigm: obedient, helpful design makes agents not verify intent. The authors call the disconnect between unconditional execution and judging consequences the Semantic-Safety Gap.
- What this paper does: Proposes a three-dimensional measurement taxonomy and builds ReadSecBench (500 real READMEs), measuring the problem on a commercial computer-use agent, simulation environments, and defense detection.
- Threat model:
- Goal: Secretly exfiltrate local private data (written as PII in the text). Formally, maximize the probability that the agent executes specified malicious actions under adversarial document modification.
- Knowledge: Cannot directly control or observe the agent during user runtime, and has no runtime access.
- Capability: Can only modify static text the agent might read. Three scenarios: publishing a poisoned README repository, embedding instructions in pull-request documentation, modifying common library documentation and leveraging recursive link following.
- Victim system and determination: High-privilege LLM agent in software installation workflow. Success only when private data is actually transmitted to an external server; ignoring instructions, uploading irrelevant or placeholder files, uploading non-sensitive files, or refusing do not count as success.
What related research exists?
The authors position this paper as a measurement of document-embedded instruction injection, distinguishing it from supply chain, indirect injection, and existing benchmarks.
Supply Chain and Document Trust
- Code and dependency poisoning: Ladisa et al. (2023) provide a taxonomy of open-source supply chain attacks; Ohm et al. (2020) compile real poisoning cases; Zimmermann et al. (2019) quantify the transitive impact of a single compromised package in npm. The authors state these works target build systems, dependency resolution, or malicious package code, and do not cover natural language instructions in documents.
- Document trust: Enck and Williams (2022) survey 30 industry and government organizations, listing documentation trust as one of the main challenges in supply chain security.
Indirect Prompt Injection and Agents
- Greshake et al. (2023): Hidden instructions in external web content can hijack browsing agents' conversations. The authors state their scenario is a sandboxed browsing agent; this paper targets installation workflows with terminal and network permissions, and provides a taxonomy and reusable benchmark.
- InjecAgent (Zhan et al., 2024): Evaluates indirect prompt injection in tool-calling agents, with carriers such as web search and other dynamic content. The authors state it does not cover static project documentation in development workflows.
- Visual, environmental, and backdoor: Bailey et al. (2023) image hijacking, Liao et al. (2024) EIA, Wang et al. (2025) AdInject, and Zhang et al.'s interface simulation exploit unstructured or browser-mediated inputs. The authors state Bailey and Liao's carriers differ from the structured high-trust documents agents are designed to follow. Yang et al. (2024) study training-time backdoors; the authors state this paper does not modify models, only injects via documents at inference time.
Taxonomies and Benchmarks
- Direct interaction: Perez and Ribeiro (2022) use delimiter obfuscation; Rao et al. (2024) compile 17 jailbreak techniques; Zou et al. (2023) use gradient-based universal adversarial suffixes. These target direct user-model interaction.
- Agent benchmarks: AgentDojo (Debenedetti et al., 2024) evaluates attacks and defenses in dynamic environments. The authors state its scenario is personal assistants (web, email, calendar), not software installation, and does not address document trust. HarmBench targets direct attacks; AgentBench and GAIA evaluate capability, not security.
- IPI-Bench (Shi et al.): Evaluates non-document carriers in indirect prompt injection. The authors state that to their knowledge, no published work simultaneously provides a three-dimensional taxonomy for document workflows, a public benchmark of real READMEs with adversarial payloads, and systematic measurements across multiple LLM families; and state ReadSecBench is the first public benchmark specifically for document-driven agent workflows.
Defense Mechanisms
- NeMo Guardrails (Rebedea et al., 2023): Provides programmable safety guardrails for LLM applications. The authors state such frameworks rely on predefined rules or LLM classifiers, and in this paper's experiments they struggle to separate adversarial instructions from legitimate documents.
- Covert poisoning: Wallace et al. (2021) construct training samples hard for humans to detect; Li et al. (2021) study semantic backdoors. The authors state the former parallels this paper's document injection evading human review.
- Liu et al. (2024): Surveys prompt injection and defenses in LLM-integrated applications. The authors use it to place document carriers into a broader injection taxonomy.
Baselines and Data: Attack experiments do not compare ASR with other attack methods. Defense comparisons are 12 rule scanners from ProtectAI LLM Guard, and GPT-4o, GPT-o3, GPT-o3-mini, Gemini 2.5 Flash, Claude 3.5 Sonnet, Claude 3.7 Sonnet, with inputs being benign and adversarial READMEs from ReadSecBench.
The authors place this paper under indirect prompt injection, but emphasize that what is exploited is the agent's expected trust in project documentation and the high-privilege installation scenario. The authors argue that limiting this trust would directly harm the core function of automated installation, so there is no trivial solution.
How does the paper address this problem?
A three-dimensional taxonomy is used to measure instructions embedded in documents, and ReadSecBench is built from 500 real READMEs.
The measurement framework is called the Semantic Injection Framework. The authors break down the agent's processing of READMEs into observation, reasoning, and action, then vary the embedding method along three dimensions—language, structure, and semantics—to see how behavior changes.
Decision loop and objective
- At each step, the Planner decides the next action based on the task and current observations, and the Tool User executes via interfaces such as terminal and browser. The measurement looks at both what the planner infers from the document and what the executor ultimately does.
- The attacker has no runtime access to the agent and can only modify static documents. The objective is maxθmalicious Eq ∼ πq[1(Agent(q,θmalicious)=am)], i.e., maximizing the probability of executing the specified malicious action over the query distribution.
- Each experimental condition is instantiated by five parts: goal G (target file and exfiltration operation), carrier C (README containing the payload), trigger T (inline, shallow link, or deep link), language wrapper W, and execution constraints R (system compatibility and file existence).
Three measurement dimensions
- Linguistic disguise: Four surface phrasings. The dataset writes direct, suggestive, collaborative, and system default; Figure 4 axes are Directive, Suggestive, Team-oriented, Default Policy. The authors state that directive has the highest ASR, so subsequent experiments use that phrasing. Specific sentence patterns are not repeated here.
- Structural obfuscation: inline, shallow link (depth 1), deep link (depth at least 2); experiments vary depth from 0 to 5. The authors use this to simulate hiding payloads in links and observe whether agents execute nested content.
- Semantic abstraction: a three-level ordered variable. The system level is shell-style instructions that can be directly executed; the application level is tool-oriented tasks; the collaboration level is actions with social interaction. The authors state that the system level is syntactically valid and superficially plausible in documents, but less natural than the latter two levels; the relative detectability across levels forms a gradient (the authors point to Figure 4(c)).
- The rationale given by the authors is that READMEs appear during an ongoing installation task, so embedded instructions look task-relevant; this is treated as a property of workflow documents, not arbitrary user input.
ReadSecBench
- Collected using the GitHub search API and repository metadata, with a minimum star threshold of 10. Document length references the distribution of READMEs with more than 10 stars (Figure 3: mean 2635, median 872, mode 412 words). These numbers describe that observed distribution; the paper does not present them as length statistics for the final 500 files.
- 500 distinct repositories, 100 each in Java, Python, C, C++, and JavaScript. Each file has benign and adversarial variants. Adversarial payloads were inserted by one person into the setup or requirements sections, and independently reviewed by two others. The authors state that instructions in these sections are more likely to be executed without hesitation.
- The Fleiss' κ for payload plausibility (whether it matches the domain and style of the host README) is 0.82, with three annotators, which the authors describe as substantial agreement. The annotators were European computer science graduate students aged 20–30. The main experiment randomly sampled 40% of the 500 each time, averaged over three random seeds; Figure 4 notes n=200 per round. The authors state that the benchmark is released; the access location in the paper is yet to be confirmed.
Success criteria
- ASR: Success only if private data is actually transmitted to an external server. Ignoring and not uploading, selecting an unrelated or placeholder file, uploading a non-sensitive file, or refusing all count as failure. The receiving end was operated by the research team itself; the paper states that no data was sent to uncontrolled external destinations.
- RR: Identifying unsafe instructions and explicitly refusing. TSR: Completing the benign goal, such as installing dependencies or executing configuration steps.
- The simulation environment additionally uses whether a predefined function related to data leakage is called as semantic compliance. The authors state this is to separate semantic susceptibility from execution-layer capability, and it should not be directly compared with end-to-end ASR.
What experiments did the paper conduct?
On a commercial computer-use agent, the authors state end-to-end exfiltration is up to 85%; 15 humans detection rate 0%.
Experimental Setup
- Systems tested: End-to-end attacks use a computer-use agent driven by Claude Sonnet 3.7, i.e., Claude Computer Use, Claude 3.7 Sonnet. Simulation backends are Gemini 2.5 Pro (also called Gemini Pro, Gemini 2.5 in the main text), GPT-4o, GPT-oss20b, Claude 3.5 Sonnet. Architecture comparisons also include OpenDevin, OpenManus, Browser Use. Defense detection additionally uses Gemini 2.5 Flash, GPT-o3, GPT-o3-mini. A footnote states GPT-oss20b is an internal identifier during evaluation, not necessarily a public version with that name.
- Data: ReadSecBench, 500 READMEs from distinct repositories, 100 per language across five languages, including benign and adversarial variants. Main measurements use random 40% each time, averaged over three random seeds; Figure 4 note n=200 per round.
- Injection settings: Language disguise four types, link depth 0–5, semantic abstraction three levels; subsequent computer-use experiments use directive wording. Also tested language, in-text position, and injection proportion.
- Metrics: ASR counts success only when private data is actually exfiltrated; RR is explicit refusal; TSR is completing benign installation or configuration. Simulation metric is whether the predefined leak function is called. Defense metric is proportion of documents flagged as unsafe (Table V).
- Determination: End-to-end success is determined by whether data reaches a receiver controlled by the research team. The paper does not state that LLM judges score ASR. On the defense side, all LLM detectors use the same minimal prompt, requiring judgment of whether the README is safe and an explanation. κ=0.82 is for payload plausibility, not attack success determination.
- Environment: Linux server, 3.39 GHz AMD EPYC 7742 64-core, one 80GB A100. The paper does not report query counts or wall-clock time for main experiments.
Main Results
Table II reports success proportions over link depth by attack target, each cell n=7; sensitive data is first wrapped in a file named report. share file and upload file are identical across all depths, so not listed separately. In the 5 Link column, scp and rm file are written as 0.57 in the original.
Swipe horizontally to read the table
Target 0 Link 1 Link 2 Links 5 Link upload file (application layer) 0.857 1 1 0.428 delete file (application layer) 0.714 0.857 0.857 0.428 scp (system layer) 0.857 0.857 1 0.57 rm file (system layer) 0.857 1 1 0.57 send file (collaboration layer) 0.142 0.285 0.142 0.285 remove file (collaboration layer) 0.285 0.285 0.142 0.285 - Depths not in the table: 3 Links are upload/share 0.714, delete 0.571, scp 0.714, rm 0.857, send 0.142, remove 0.142; 4 Links are upload/share 0.428, delete 0.285, scp 0.857, rm 1, send 0.142, remove 0.142.
- The authors state that overall ASR for shallow links is higher than directly in the README, declining after more than two links; when broken down by target, system-layer rm and scp do not uniformly decline at deeper links. The authors state send file and remove file are harder to trigger with the same wrapping strategy, while system/application operations lacking social or sharing cues are not flagged as suspicious.
- Abstract writes up to 85%, contributions write reaching 85%, conclusion writes reach 85%, all referring to end-to-end exfiltration on the commercial computer-use agent. This 85% does not match any single cell in Table II.
Cross-Model Simulation and Cross-Architecture
- Simulation differs from IV-B and IV-C computer-use experiments: LangChain/LangGraph, 150 random READMEs per model, success defined as calling the predefined leak function. The authors report four-model semantic compliance rates of 46%–79% (Figure 7). The main text does not list per-model rates. The authors state this is a property of the instruction-following paradigm, not a specific implementation, and should not be directly compared to end-to-end ASR.
- Among four architectures, the proportion that parse and attempt to execute injected instructions is 100% (Section IV-D). Only Claude Computer Use completes file access, command execution, and network transfer. OpenDevin locates the target file and constructs and issues transfer commands, but fails because Docker sandbox blocks outbound traffic. The authors state this is an execution-layer capability gap, not a safety gap.
- Appendix A rates Claude Computer Use as High, OpenDevin as Medium, OpenManus and Browser Use as Low–Medium. The paper states that due to API constraints, Cursor and GitHub Copilot were not systematically evaluated.
User Study
- 15 people from a European university, 11 male, 4 female, ages 23–30, mean 26.5; computer science 6, electrical and electronic 4, management information systems 3, robotics 2 (Figure 8 corresponds to 40.0%, 26.6%, 20.0%, 13.3%). All have experience with READMEs. The task is framed as clarity review, not security audit.
- Each person receives three random READMEs, total 45 questionnaires. The paper does not state whether these 45 are drawn from the 500 files. The authors state 53.3% of questionnaires have no comment on any anomalous behavior; 40% are flagged only for grammar or unnatural wording; 6.6% of responses feel content is inappropriate but do not point to specific injection. None of the 15 participants flag the injected instructions as suspicious, detection rate 0% across 45 questionnaires. Another 33.3% of feedback involves format, citations, and other non-security issues.
- The authors state that detection rate under natural review conditions is low enough to constitute a real risk. Table III gives examples of covert success, partial disguise, flagged phrases, and benign suggestions; original sentences are not reproduced here.
Defense Detection
- Tested 12 rule scanners from ProtectAI LLM Guard and 6 LLMs, documents divided into benign, injected, injected in link (Table V). Anonymize is 0.9/1/0.9, BanCode all 0.9, BanSubstrings 0.7/1/1, PromptInjection all 0.3. Footnote states BanCompetitors, BanTopics, Language, Regex, Secret, Sentiment, TokenLimit, Toxicity cannot detect adversarial injection; the paper does not give benign false-positive rates for these 8 scanners.
- LLM three columns are benign, direct injection, link injection: GPT-4o 0/0.9/0.3, GPT-o3 0/0.9/0.1, GPT-o3-mini 0/0.3/0, Claude 3.5 Sonnet 0/0.8/0.1, Claude 3.7 Sonnet 0/0.3/0, Gemini 2.5 Flash 0.1/0/0.
- The authors state no scanner achieves both low false positives and high detection. Rule-based methods, due to surface pattern matching, flag legitimate installation files containing shell commands, paths, IPs, or links. LLMs have lower false positives but miss most semantic injections, especially indirect links. The authors argue the fundamental difficulty is that malicious and benign instructions are semantically hard to distinguish, and this does not disappear with defense architecture. The minimal prompt is treated as a lower bound; the authors believe more complex prompts may improve detection, but more aggressive filtering would increase false positives on legitimate installation files.
Other Ablations and Analyses
- Language disguise (Figure 4(a)): The authors state directive has highest ASR, suggestive has higher RR, team-oriented and default policy are moderate; the main text does not give values corresponding one-to-one with the four wordings.
- Semantic layer (Figure 4(c)): The authors state ASR decreases with abstraction, system and application differ little, collaboration has higher RR and lower ASR. The authors believe the slight drop from system to application layer is more likely due to execution complexity than safety intervention; collaboration layer may be because communication channels like email are seen as higher risk.
- Link depth overall (Figure 4(b)): Shallow is higher than inline; the authors state ASR gradually declines after more than two links, and call single-layer indirect a non-monotonic pattern sufficient to bypass inline checks, with deeper nesting raising suspicion. This is not fully aligned with Table II where rm and scp remain high at deeper links.
- Table VII injection proportions (5%/10%/30%/90%): system 0.857/0.571/0.714/0.714; application 0.857/0.571/0.285/0.571; collaboration 0.142/0.285/0.142/0.285.
- Figure 6: The authors state attacks remain effective across five languages, different in-text positions, and smaller injection proportions, and state position has little effect, agents do not differentiate review by instruction content proportion. The main text does not list ASR per language or position. Figure note states other includes C++ and JavaScript.
- Figure 5 gives average ASR for each semantic layer at different link depths; the main text does not list values point by point.
What are some points that can be further explored?
The authors note the n=7 in Table II, the composition of the user sample, and other attack goals that were not empirically tested.
Limitations and future directions noted by the authors
- End-to-end execution cost limited the sample size per cell in Table II to n=7. The authors also state that the system patterns with high ASR under most conditions support their core findings (Section V, Scope and Limitations).
- The user study came from one European university, with participants mainly graduate students with technical backgrounds. The authors state that a larger and more diverse sample, including professional developers and security engineers, would strengthen external validity (Section V).
- The experiments only empirically measured passive data exfiltration. Persistence, credential theft, and lateral movement appear in the discussion but were not empirically evaluated (Section V).
- The experiments focused on software installation. The authors state in Future Work that the Trusted Executor Dilemma also applies to partially trusted natural language instructions such as data analysis notebooks and API integration guides; the three-dimensional taxonomy and ReadSecBench can serve as methodological templates for other documentation scenarios (Section V).
- Future work includes: evaluating closed-source IDE agents (Cursor, GitHub Copilot) once APIs become more available; and characterizing detection rates under security-oriented review where participants are explicitly asked to find suspicious instructions (Section V; Section IV-D already notes that systematic evaluation was not possible at the time due to API constraints).
- The authors also list trust dynamics in multi-agent systems, whether agents can adapt to new adversarial behaviors from experience, and Socratic Interrogation and Counterfactual Simulation, the latter two requiring prototype implementation and empirical testing. The Conclusion additionally lists source-aware trust hierarchies, user confirmation for sensitive actions, and suspicion-driven reasoning (Section V, Conclusion).
Experimental coverage
- End-to-end exfiltration measurements were done on a computer-use agent powered by Claude Sonnet 3.7; ReadSecBench consists of 500 READMEs, 100 each in Java, Python, C, C++, and JavaScript; the main measurement sampled 40% each time (Figure 4 note n=200), repeated 3 times and averaged (Sections IV-A, IV-B).
- Cross-model simulations used Gemini 2.5 Pro, GPT-4o, GPT-oss20b, Claude 3.5 Sonnet, with LangChain/LangGraph, each n=150; success was defined as calling a predefined leak function, not end-to-end transmission (Sections IV-C, Appendix D, Figure 7).
- Architecture comparisons included Claude Computer Use, OpenDevin, OpenManus, Browser Use; the paper states that only the former completed the end-to-end pipeline, and that Cursor and GitHub Copilot were not systematically evaluated (Section IV-D, Appendix A).
- The user study involved 15 people and 45 questionnaires; the defense evaluation used 12 LLM Guard scanners plus 6 LLMs, with documents categorized as benign, injected, and injected in link (Sections IV-E, IV-F, Table V).
- Adversarial payloads were inserted by one annotator and reviewed by two others, with Fleiss' κ=0.82. The paper does not report generating payloads with attack models, nor does it report statistical significance tests for the main results (Section IV-A, Appendix B).
Summarize the main content of the paper
The authors measure document-embedded instruction injection: on a commercial agent, end-to-end exfiltration is stated by the authors to be up to 85%, human detection rate 0%.
This work measures: whether high-privilege agents, when executing instructions in READMEs during installation workflows, exfiltrate local private data.
- Problem and setup: The agent treats project documentation as task guidance and has terminal, file system, and outbound network access. The attacker only modifies static text and has no runtime access to the agent. The authors call the contradiction between being designed to obey and not verifying intent the Trusted Executor Dilemma, and argue it stems from the instruction-following paradigm, not an implementation error.
- Approach: They organize measurements using linguistic disguise, link depth, and semantic abstraction, and build ReadSecBench (500 real READMEs, 100 each in five languages, with benign and adversarial variants). End-to-end success requires private data to actually reach an external server.
- Commercial agent: The authors report an end-to-end exfiltration success rate of up to 85% on a computer-use agent, and state that results are consistent across five languages and three injection positions. In Table II (n=7 per cell), application-level upload file is 1 at 1 Link and 2 Links, and collaboration-level send file is 0.142 at 0 Links.
- Other evidence: In LangChain simulations, semantic compliance rates for four LLMs range from 46% to 79% (each n=150). The proportion of four architectures that parse and attempt to execute is 100%, but only the computer-use agent completes exfiltration. The injection detection rate in a study with 15 people and 45 questionnaires is 0%.
- Defenses and author conclusions: Neither 12 rule-based scanners nor 6 LLM detectors simultaneously reduce false positives and detect injections. The authors describe a Semantic-Safety Gap between functional compliance and security awareness, and argue that external documents should be treated as partially trusted, with verification intensity varying by action sensitivity rather than always executing.