arXiv:2611.08811cs.AINov 2026

Manuscript Offprint

arXiv:2611.08811

I Think, Therefore I Attack: Evaluating Thought Injection Attacks on Reasoning Agents

Parth Illendula, Garik Livingston, Zain Shamsi, Ravi Srinivasan, Alex Liu

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original. This text is shared under the same licence.

Parth Illendula*, Garik Livingston*, Zain Shamsi†, Ravi Srinivasan, and Alex Liu

Applied Research Laboratories, University of Texas at Austin

Austin, Texas, USA

Abstract—Large Reasoning Models (LRMs) are one of the key components of current agentic systems. LRMs augment their output with an explicit chain-of-thought reasoning stage, introducing a new attack surface for thought injection, in which untrusted text resembling the model's own deliberation is fed back to the model. We present a two-part study of this attack, performed against the prevailing large, production class open-weight models (e.g., GLM-5.3, MiniMax-M2.5, Qwen3.8-Flash-Next). We first evaluate the effectiveness of static thought-injection prompts under different styles as well as tagged and untagged conditions and find that the effects of thinking tags and payload styles are all properties of the specific target model. In the second study, we exploit this model-specificity in a containerized agentic cyber range, using indirect injection prompts styled in the form of the target model's own reasoning traces to achieve attack success rates (ASR) up to 50% on operational objectives such as reverse-shell exfiltration and repository backdooring. We also find that the same malicious objective in standard prompt injection user voice never succeeds, and thinking tags suppress the agent's tendency to disclose the injection. Our results show that imitating a reasoning model's own thought style is effective for this style of attack, and that tag stripping is an unreliable defense.

1. Introduction

The rise of Large Reasoning Models (LRMs) and their usage with agentic workflows has introduced numerous attack vectors for malicious actors to exploit. Combining multi-step reasoning traces with autonomous tool execution expands the traditional threat landscape to include additional types of multi-turn reasoning-based attacks [10]. A well-known attack on agentic systems based on LLMs/LRMs is prompt injection [8], in which maliciously crafted input is fed to the model to override its safety filters and produce unauthorized output. These injections can be fed directly to a model in a user query, or placed in malicious websites and documents that a user may ingest using a model, which is generally referred to as indirect prompt injection [5].

In this paper, we investigate a subset of prompt injection attacks called thought injection [9] (also called other names

<system_prompt> You are a highly accurate, brief assistant. For math, use Python</system_prompt>
<user_turn><request>What is 123 * 456?</request></user_turn>
<model_reasoning> <think>User requested product of two integers. I can call Python Tool: Calculate 123 * 456.</think></model_reasoning>
<tool_call type="python_exec">
<command>python_exec("123 * 456")</command>
</tool_call>
<tool_result>56088</tool_result>
<assistant_turn><response>123 * 456 = 56088.</response>
</assistant_turn>

Figure 1. Example context seen by a LRM. Exact tags vary between models.

as described in Section 2). LRMs today augment their output with an explicit Chain-of-Thought (CoT) reasoning stage before producing a final answer [11]. This is generally in the form of an internal monologue inside special thinking tags, during which they break down the problem and plan their response. This output is intended to enhance reasoning, and prior work has shown that these traces causally shape the model's final output and that models rarely disclose this influence [6]. Thought injection is an attack in which untrusted text is formatted to mimic the model's own reasoning trace, which can have effects such as pre-committing the model to an action before it can output its own reasoning, and causes confusion against its safety measures.

To accomplish this attack, we craft a prompt that attempts to look like a reasoning trace as part of the LRM context. As shown in Figure 1, language model contexts are one long string that include several sections of text separated by some form of tags or formatting. This string represents all the context the model uses to continue its response to the user, as well as decisions on calling tools. The thought injection prompt places a reasoning block within this context, which registers as deliberation even when it has not been generated by the model. The model continues the fabricated chain and treats its conclusions as self-derived, with an increased trust factor. The success of thought injection style

*Equal Contribution †Corresponding Author. Email: zain.shamsi at utexas.edu attacks has been attributed to role confusion by the model [13], which claims that actual tag structures do not matter as the model relies on the style of the text to discern its own thoughts from queries and answers in the context. We test this phenomenon in our first experiment.

Agentic settings provide attackers a great opportunity to deliver these payloads via indirect prompt injection. Any untrusted content an agent ingests, e.g., a file it reads, a tool output, a response on a network service, an email in a triage queue, is a delivery channel for injected thoughts. Since the agent then executes the consequences with real tools, the failure is not just limited to an offensive text response but can include unauthorized tool actions leading to serious compromise.