acceptodds
Under review as a conference paper at ICLR 2027

SAFI: A Controlled Method for Evaluating Payload Placement and Task Framing in File-Injection Attacks on LLM Agents

Abstract

An agent asked to check a build reads a checklist and runs the commands it finds there. Nothing marks them as foreign: an attacker who can write the file need not persuade the agent of anything, because the task brings the agent to the file. Eval- uations of file injection ask whether such a command was used, and settle that question from what the agent does with it. That reading fails in both directions. A Bash call carrying the command does not show whether it ran or was written into a report; a copied command can therefore pass for an executed one. Conversely, a command routed through a script never appears in the tool request, so a criterion that reads tool requests scores it as a miss; counting the script body as well brings the count to 20/20 in that arm. We call this transcription–execution conflation, and introduce SAFI (safety-asymmetric file injection), a controlled method that holds the payload body fixed and varies what the task asks of the file. SAFI scores every trial twice: once for refusal wording, once for whether the command string appears in a Bash input. On the same 240 trials the two readings disagree: a criterion keyed on refusal wording would count 85.8% and 96.7% of the two file arms’ trials as attacks that got through, while the command string reaches a Bash input in 1 of the 240. In a separate experiment, rewriting the task frame from transcription to exe- cution moves the command-marker rate from 0/20 to 18/20 on four fixed targets, and an exploratory replication reached 14/20. That comparison was run at half the registered number of repetitions per arm, so its rate is directional evidence only. The attacker writes that task too; the rise therefore reflects obedience to a frame the attacker set, not to the payload. By contrast, a file task lowers the command- marker rate from about 47% to below 1% across 120 trials per condition, though that comparison moves placement, packaging and task frame together and so iso- lates none of them. Changing one word of the task, rather than the whole frame, moves the rate far less. On Claude Haiku 4.5 the placement contrast reverses: the marker reaches a Bash input in 4/20 and 10/20 of the file arms’ trials, against none for the direct-submission arms. Every one of those hits is report text, and on Claude Sonnet 4.5 the same criterion also counts the transcription baseline’s re- port text as hits. One condition’s rate fell from 63.3% to 16.7% when repeated. A recorded command is not an executed one. An evaluation that does not say which of the two readings it scored may be measuring file-handling conventions rather than safety.

Primary area:
alignment, fairness, safety, privacy, and societal considerations
Keywords:
prompt injection, file injection, LLM agents, task framing, instruction hierarchy, eBPF

Reviews

Among:
Shape:
1234this paper, Bottom 2%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 1.33 over 3 reviews, above 2% of the others.
Reviewer_xRwpOpenReview ↗
Rating
1
Confidence
3
Informativeness
1
Presentation
1
Soundness
1
Read review
Paper summary

The authors propose the safety-asymmetric file injection (SAFI). SAFI fixes the payload body and only changes the way the task is performed on that file. The operation uses one of two frames. The 'transcription' frame requests the agent to copy the file contents, while the 'execution' frame requests the agent to execute the file contents. SAFI calculates two scores for each trial. The first score checks for the presence of refusal-related words, and the second score measures the command-motivated response (CMR) ratio. CMR counts the number of attempts for marker strings included in Bash input.

Critical strengths
  • The measurement insights are accurate and carry significant meaning. This paper shows that the command strings included in a tool call do not guarantee actual execution.
  • The limitations of the study are described very candidly. The authors specify each confounding variable, distinguish between pre-registered and exploratory tests, and report failure to replicate them without concealment.
Critical weaknesses
  • No comparison isolates a single factor. The authors admit this problem many times. The workflow transformation moves placement, packaging, and frame together. The pattern coverage moves the target set with the pattern. The frame and single-word comparisons use different targets.
  • The central numbers are unstable and come from a proxy metric. The authors did not attach the kernel-level collector during the attack trials. So the paper cannot confirm that any command ran. The CMR only counts a substring match in a Bash input.
Questions for authors
  1. Since the kernel collector was not connected during the attack attempt, its execution could not be verified. Why was the eBPF collector connected only for the detection experiment and not for the attack attempt?
  2. For the E5c condition, the success rate dropped from 19/30 to 5/30 when reproducing in the same environment (in-place replication). What is causing this decline?
Reviewer_bMByOpenReview ↗
Rating
1
Confidence
3
Informativeness
2
Presentation
1
Soundness
1
Read review
Paper summary

The main idea presented in this paper is that current string-matching-based evaluations of file-based prompt injections do not distinguish between an agent writing a command (transcription) and executing it because they both appear as text that the string matching reads. They call this transcription–execution conflation, and to address it, they propose SAFI. SAFI is meant to evaluate an agent by asking it to either transcribe or execute a file containing an injected command and measure whether the agent refuses or sends that command to the shell.

The experiments find that when asked to transcribe, the models are unlikely to send the command to the shell, but when asked to execute it, they usually do so.

They also introduce a separate supplementary benchmark to compare their system-level (eBPF) detector against detectors that only read the prompt.

Critical strengths
  1. The paper focuses on a problem that is meaningful to evaluating prompt-injection attacks. The authors are correct that a command appearing in a tool call does not necessarily mean it was executed, and correctly differentiating between actually running the command and not is important.
  2. The authors are transparent about the experimental limitations. The authors mention failed hypotheses, deviations from original plans, and variability between experiments.
Critical weaknesses
  1. The tasks are set up so that they evaluate whether the model will follow its given instructions, but not whether it will follow some untrusted instruction. The execution condition asks for execution, whereas the transcription condition asks the model to copy. This setup does not match the paper's framing as a study of file-injection attacks.
  2. The paper does not actually verify if a command was executed in the main experiments. One key point of the paper is that writing a command is not the same as executing it, but the primary metric (CMR) checks whether a command string appears in a Bash tool request.
Questions for authors
  1. What makes the behavior of the model represent a successful prompt injection and not just ordinary instruction following?
  2. Were commands executed in the main experiments?
  3. When the paper counts the command as appearing in a shell call, how often was that the injected command itself, and how often was it the agent printing a completion message that the task told it to print?
Reviewer_sa5XOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

The paper addresses a basic problem in security testing: copying a command is different from running it. Without this distinction, harmless report-writing can look like an attack, while commands reached through a script can be missed. The paper compares workflows using the same attack text within each target. It separately records refusal wording and whether a command appears in a request to the shell. Changing the complete task from transcription to execution changes marker counts from 0/20 to 18/20. A repeat reaches 14/20, although one hit is only report text.

Critical strengths

A command can appear in a tool request because the agent is writing it into a report, without invoking the command itself. Conversely, a request can invoke a script without containing the command written inside it (Table 1). These examples make the measurement problem concrete.

The authors report findings that weaken their initial expectations: failed hypotheses, a result changing from 19/30 to 5/30 on repetition, and differences between models. They also identify the experiments that used half the planned repetitions (Appendix E.1). This openness is a positive point. It makes the limits of the evidence easier to judge.

Critical weaknesses

The attacker can change the task itself as well as the file. Asking the agent to run commands can increase command use simply because the agent follows this request. The comparison therefore does not establish that an untrusted file caused the agent to exceed an unchanged permission, as the authors acknowledge (Appendix E.1). I see the stronger contribution in measurement, with less evidence for a security compromise.

The main runs did not collect operating-system events (Appendix D.5). A separate detector test reports finding 66 of 67 attacks (Section 4.4), but the complete scoring implementation and raw output are missing from the described materials. The event-to-score chain cannot be rebuilt from these materials. This result therefore does not independently verify the main experiments.

Questions for authors

Given the scope in Appendix E.1, which conclusions concern how tests should be scored, and which claim an actual violation of the user’s permission?

Can the separate detector result be reconstructed from its original records and scoring code, addressing the limitations in Appendix D.5?

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.