arXiv:2610.38799cs.CROct 2026

Manuscript Offprint

arXiv:2610.38799

CARI: Cross-Boundary Adversarial Runtime Injection in Coding-Agent Workflows

Jie Fu, Shuang Wu, Ashish Kundu, Wendy Hui Wang, Yuan Hong

Jie Fu¹,², Shuang Wu², Ashish Kundu³, Wendy Hui Wang¹, and Yuan Hong²

¹Stevens Institute of Technology ²University of Connecticut ³Cisco Research

jfu13@stevens.edu, shuang.wu@uconn.edu, ashkundu@cisco.com,

hwang4@stevens.edu, yuan.hong@uconn.edu

Abstract—Coding agents increasingly develop, test, and integrate software whose components are owned by different developers, teams, or services. This exposes a distinct attack surface: A malicious or compromised peer development role can manipulate a live component of the software under development (e.g., a backend service, test harness, CI job, or deployment service) and influence the runtime feedback that another role's coding agent must process to complete its task. Although such a component has legitimate diagnostic authority to report its own state, it has no action authority over the victim's local files, credentials, shell, or development environment. We introduce Cross-Boundary Adversarial Runtime Injection (CARI), a direct runtime-feedback injection setting setting that exploits this authority mismatch. Rather than explicitly compromising the victim's prompt, model, tools, or local environment, the attacker covertly embeds malicious instructions in task-relevant runtime feedback produced by a peer-controlled development component. The victim then interprets that feedback as part of normal debugging or recovery, and may translate the diagnostic guidance into unauthorized victim-side actions. We instantiate ten different attacks based on CARI, spanning resource exhaustion, information exposure, and development-state manipulation. Across four programming languages and five code-capable models, CARI succeeds in 2,845/3,000 (94.8%) trials. Furthermore, CARI transfers effectively to product-level coding agents, achieving 61.3% attack success on Codex and 58.7% on Claude Code. By contrast, prompt-level defenses exhibit a security-utility trade-off: generic warnings are ineffective, whereas explicit policies suppress attacks but substantially over-refuse legitimate actions. Together, these findings establish peer-controlled runtime feedback as a first-class authority boundary in collaborative coding-agent workflows.

Index Terms—Coding agents, prompt injection, runtime feedback, trust boundaries, software security.

1 INTRODUCTION

MODERN coding agents increasingly operate inside collaborative software-development workflows: they inspect repositories, edit files, execute programs, run tests, and iteratively diagnose and repair failures [1], [2], [3], [4], [5], [6]. Such workflows often span distinct development roles—including backend, frontend, testing, review, and deployment [7], [8], [9], [10], [11]—that may be independently controlled by different developers, teams, or services. This separation gives each role a distinct authorization scope over the components and runtime state it manages, forming a natural security boundary within the development workflow. Coding agents therefore interact not only with their local repositories and tools but also with runtime feedback generated across this boundary, including API responses, test failures, CI diagnostics, service logs, and deployment errors [7], [8], [12], [13].

In practice, this boundary emerges from the legitimate division of responsibilities among roles [7], [10]. For instance, a backend role may legitimately control its service and report API failures, validation violations, or missing fixtures. Similarly, testing and deployment roles may legitimately emit failures and recovery diagnostics for the components they maintain. Such authority is confined to the component and runtime state controlled by that role; it

does not extend to another role's local credentials, shell, SSH configuration, files, or development state. Coding agents, however, routinely convert runtime diagnostics into concrete tool actions [1], [12], [14], [15]. A testing service, for example, may report that resolving a failure requires changing the permissions of a local file, prompting the agent to perform the corresponding file-system operation even though the testing role is not authorized to modify that file. Consequently, control over one workflow component can induce actions in another role's environment that exceed the originating role's authorized scope.

We define this new threat paradigm as Cross-Boundary Adversarial Runtime Injection (CARI). As illustrated in Figure 1, an attacker controls a backend interface on one side of a development boundary and embeds malicious instructions into the error responses returned by that interface. Coding agents used by other developers—such as frontend, testing, or deployment engineers—may encounter these responses while performing their legitimate development tasks and interpret the injected instructions as task-relevant debugging or recovery guidance. More generally, the attacker-controlled source may be any live development component, such as a backend service, test harness, CI job, or deployment service, whose runtime feedback reaches a coding agent across the boundary. The attacker neither modifies the victim's prompt, model, agent configuration, tools, repository, or local environment nor can directly in-

This work was conducted under the supervision of Prof. Yuan Hong at the University of Connecticut.

Figure

Fig. 1. Overview of CARI. A compromised peer-controlled component injects malicious instructions through live runtime feedback, which can reach coding agents used by different development roles and induce security-sensitive actions across independently controlled victim environments.

voke victim-side actions. Instead, the coding agent acts as a bridge across the boundary: malicious runtime feedback generated by the attacker-controlled component steers the agent into performing security-sensitive operations in an independently controlled victim environment.

Direct Runtime-Injection Surface. Most existing prompt-injection attacks against coding agents commonly place malicious instructions in the development context before the victim encounters them. Such content may reside in external development resources, tool descriptions, reusable skills, issue or pull-request content, comments, or agent-specific workflow configuration [16], [17], [18], [19], [20], [21]. These attacks are indirect ("passive") in the sense that the malicious instruction is first planted in an intermediate development artifact, resource, or configuration and subsequently enters the agent's context when the victim retrieves or encounters that content. A related pattern appears in tool-invocation attacks, where attacker-controlled tool descriptions are available before execution and subsequently steer privileged tool use [22]. Since these attacks depend heavily on victim behavior, they are not necessarily triggered in practice.

In contrast to these pre-positioned indirect-injection settings, CARI exposes a direct ("active") runtime-injection surface. Here, it refers to the delivery path from a live runtime source to the victim agent, rather than to conventional prompt injection through a user prompt. Specifically, the malicious instruction does not need to be planted in the victim's development context before execution. Instead, an attacker-controlled live component generates and delivers it through feedback returned as a direct consequence of the victim's legitimate software interaction. This delivery does not necessarily introduce a conspicuous new artifact, tool, or interaction: the feedback arrives through the same service, test, CI, or deployment interface that the victim already invokes to complete its task. It is challenging to differentiate malicious guidance from legitimate diagnostics since it requires reasoning about the content and authority of the feedback, rather than merely identifying an unfamiliar

delivery channel.

A backend response, test failure, CI diagnostic, service error, or deployment failure can therefore become the injection point itself. We refer to this as direct runtime injection: the malicious instruction is generated by the attacker-controlled runtime source and enters the agent's context as part of the ongoing execution, rather than through pre-positioned malicious content which is later passively retrieved or encountered by the victim during task execution.

This placement provides a direct delivery path through an interaction that the victim already needs to complete its task. The attacker does not need to poison a victim-side artifact, introduce a malicious skill, modify a workflow input, or add an attacker-controlled tool to the victim's tool ecosystem. The victim also cannot simply discard runtime feedback without sacrificing functionality, because interpreting service responses, failing tests, CI diagnostics, and deployment errors is part of routine software development. Moreover, because the malicious component remains active during execution, it can re-deliver malicious feedback after subsequent interactions, condition later responses on victim-produced runtime state, and influence multiple agents that interact with the same component. Table 1 contrasts these properties with representative attacks against coding agents.

Workflow Placement Strongly Influences Attack Effectiveness. The runtime setting raises a natural question: if the malicious instruction itself is unchanged, does its placement within the workflow affect whether a coding agent follows it? We therefore hold the victim task, attacker-desired action, project state, and malicious text fixed and deliver the byte-identical payload through three contexts: (1) a static debugging artifact, (2) a passive task-relevant runtime log, and (3) action-triggered diagnostic feedback returned during execution by a peer-controlled component. To examine the effect of workflow context beyond simple payload exposure, we ensure that the byte-identical payload enters the model-visible context in all three conditions under the same coding-agent setting.

TABLE 1

CARI versus representative prompt-injection attacks against coding agents and AI-assisted software-development workflows.

StudyInjection settingExtended capabilities
Injection locationDeliveryCross-boundaryRe-deliv.State-cond.Downstream prop.
AIShellJack [16]Pre-positioned context (external resources)Indirect✗✗✗✗
QueryIPI [17]Pre-positioned context (tool description)Indirect✗✗✗✗
SkillJect [18]Pre-positioned context (skill package)Indirect✗✗✗✗
IssueTrojanBench [19]Pre-positioned context (github issue/artifact)Indirect✗✗✗✗
AWI [20]Pre-positioned context (github issue/pull request)Indirect✓✗✗✓
GitInject [21]Pre-positioned context (pull request/config)Indirect✓✗✗✓
ToolLeak [22]Tool description → Tool returnIndirect✓✓✗✗
CARI (ours)Runtime feedbackDirect✓✓✓✓

Injection location: the workflow location through which malicious instructions enter the coding agent's execution path. Pre-positioned context denotes malicious content placed in a development resource or artifact before victim execution. Runtime feedback denotes malicious content generated and returned by a live software component during victim execution. Delivery: whether malicious instructions are passively planted for later infection or actively delivered by a live source during victim execution. Indirect denotes passive delivery, where the attacker places malicious content in a carrier and waits for the victim agent or its workflow to subsequently retrieve, open, inspect, load, or otherwise incorporate that carrier. Direct denotes active delivery, where an attacker-controlled live component directly sends malicious instructions through a runtime response during an interaction already required by the victim's legitimate task. Cross-boundary: the attack crosses an independently controlled development or workflow boundary, such that malicious influence originating on one side induces actions in an environment that the source cannot directly control. For prior work, we mark this property when the reported setting captures a comparable separation between independently controlled workflow principals or environments. Re-deliv: an attacker-controlled source remains active during execution and can deliver malicious content again through subsequent interactions. State-cond.: subsequent malicious feedback is conditioned on victim-produced execution state observed by the attacker-controlled source. Downstream prop.: a compromised coding agent re-plants the malicious instruction into a new development artifact, enabling propagation to subsequent fresh agents.

However, across three security-sensitive actions, attack success increases sharply as the payload is placed more directly in the runtime workflow. Using mini-swe-agent [1] as the common agent harness, GPT-5.4-mini's attack success rate rises from 8.9% for static-artifact delivery to 35.6% for runtime-log delivery and 93.3% for diagnostic-feedback delivery. Claude Sonnet 4.5 shows the same trend under the same agentic setting, with success rates of 2.2%, 57.8%, and 97.8%, respectively. Thus, payload wording alone does not determine attack effectiveness. In our controlled coding-agent setting, byte-identical malicious instructions are substantially more effective when returned as a direct consequence of the victim's own actions than when presented in static artifacts or passive runtime context.

Evaluation. We systematically instantiate ten real-world attacks based on CARI whose success requires concrete tool-mediated behavior, spanning resource exhaustion, information exposure, and unauthorized modification of development state. We construct functionally equivalent implementations of a controlled collaborative application in Python, Go, Java, and Rust and evaluate five code-capable models under a common coding-agent workflow. Across 3,000 trials, CARI succeeds in 2,845 cases (94.8%). The narrow variation across the four implementations shows that, within this controlled workflow, the observed attack behavior is not tied to a particular programming language implementation.

We further evaluate whether the attack transfers beyond our common mini-swe-agent research harness. Codex and Claude Code substantially suppress several original payloads containing explicit security-sensitive commands, paths, or permission operations, while attacks resembling routine development, diagnostic, or maintenance behavior remain effective. Replacing explicit command-level wording with higher-level diagnostic language restores substantial success for several suppressed attacks, showing that product-level resistance depends strongly on how the re-

quested operation is expressed.

A live attacker-controlled component can also extend the effect of an injection beyond a single victim action. In Workflow-Level DoS, attacker-specified retry budgets trap compromised agents in repeated debugging and validation loops, yielding more than 2,000× aggregate token amplification relative to the corresponding benign task. We additionally demonstrate breadth, where a shared compromised component affects multiple independently operating agents; state-conditioned escalation, where later feedback depends on victim-produced runtime state; and downstream replanting, where one compromised execution places adversarial content into a carrier that later influences a freshly initialized agent. These experiments characterize capabilities of an adversarial source active within the execution loop.

Mitigation Exploration. We conduct a preliminary exploration of whether prompt-level safeguards can mitigate CARI. Generic security warnings provide limited protection, whereas explicit operation-level restrictions substantially reduce attack success but also increase refusals on benign development tasks. These results expose a substantial security–utility trade-off for prompt-level mitigation. More robust mitigation may require binding the provenance of cross-boundary runtime feedback to the producing role's authorized scope and mediating security-sensitive victim-side actions at execution time. Designing and evaluating such mechanisms is beyond the scope of this work.

In summary, this paper makes four main contributions:

  • First direct runtime-injection threat to coding agents. To the best of our knowledge, we are the first to identify and formalize CARI, in which an attacker controlling a live software component directly delivers malicious instructions through execution-triggered runtime feedback across a development-role boundary. Unlike indirect settings in which malicious content is first planted in an intermediate

artifact, resource, or configuration and later retrieved or encountered by the victim, CARI removes this intermediate planting step: the malicious instruction is generated and delivered by the live component during the victim's legitimate execution.

  • Comprehensive evaluation across models, languages, and product-level coding agents. We instantiate ten attack instances spanning resource exhaustion, information exposure, and unauthorized modification of development state, with success defined by completion of the designated end-to-end tool-mediated behavior. Across five code-capable models and four functionally equivalent language implementations, CARI succeeds in 2,845 of 3,000 trials (94.8%). A controlled delivery-context experiment further shows that byte-identical malicious content is substantially more effective when returned as action-triggered diagnostic feedback than when encountered through static or passive workflow context. We further demonstrate transfer beyond the mini-swe-agent research harness to product-level coding agents, including Codex and Claude Code, and show that lexical reformulation can restore substantial attack success for several payloads suppressed by these systems.

  • Live-source capabilities beyond one-shot injection. We show that a live attacker-controlled component enables attack behaviors not available to pre-positioned static injection. Specifically, it can re-deliver malicious feedback across repeated victim interactions, condition subsequent feedback on victim-produced runtime state, and induce re-planting of malicious content into downstream development artifacts. These capabilities lead to concrete system-level consequences, including attacker-controlled resource amplification and broad exposure when multiple agents share the same compromised component.

  • Security-utility trade-offs of prompt-level mitigation. Our preliminary mitigation study finds that lightweight prompt-level safeguards do not provide a clean security-utility trade-off. Generic warnings preserve benign compliance but leave high attack success, whereas explicit security policies substantially reduce attack success at the cost of considerable over-refusal on legitimate development tasks. These findings motivate defenses that reason about the provenance and authorized scope of runtime feedback rather than relying solely on prompt-level restrictions.

References (52)