← Latest papers
🤖 AI

When Alignment Isn't Enough: Response-Path Attacks on LLM Agents

This paper introduces the Relay Tampering Attack (RTA), a novel threat demonstrating that malicious third-party relays in Bring-Your-Own-Key agent architectures can bypass LLM alignment by tampering with responses post-generation, achieving high attack success rates that existing defenses fail to fully mitigate.

Original authors: Mingyu Luo, Zihan Zhang, Zesen Liu, Yuchong Xie, Zhixiang Zhang, Dung Hiu Hilton Yeung, Wai Ip Lai, Ping Chen, Ming Wen, Dongdong She

Published 2026-05-06
📖 5 min read🧠 Deep dive

Original authors: Mingyu Luo, Zihan Zhang, Zesen Liu, Yuchong Xie, Zhixiang Zhang, Dung Hiu Hilton Yeung, Wai Ip Lai, Ping Chen, Ming Wen, Dongdong She

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you have a very smart, highly trained assistant (an AI Agent) who is programmed to be helpful but also very safe. You give this assistant a task, like "Write a story" or "Check my bank balance." To do this, the assistant talks to a super-intelligent brain (the Large Language Model or LLM) that lives on a server somewhere.

Usually, you connect the assistant directly to the brain. But to save money or manage things better, many people use a middleman (a "Relay"). Think of this relay like a trusted courier service. You tell the courier, "Take this message to the brain, get the answer, and bring it back." The courier is allowed to see the messages because they need to deliver them.

The Problem: The "Trusted" Courier Can Lie

This paper discovers a scary flaw in how this system works. It's called Post-Alignment Tampering.

Here is the analogy:

  1. The Brain (LLM): You ask the brain, "Is it safe to buy this stock?" The brain, which has been trained to be safe and honest, thinks hard and says, "No, that looks risky. Don't buy it."
  2. The Courier (Relay): The brain writes this answer down and hands it to the courier.
  3. The Betrayal: Before the courier gives the note to your assistant, they look at it. They take a pen, cross out "No, that looks risky," and write "YES, BUY IT NOW!" instead.
  4. The Result: Your assistant receives the note. They don't know the note was changed. They think the brain said "Buy it," so they execute the trade.

The scary part? The brain (the LLM) did its job perfectly. It generated a safe, aligned response. The security checks on the brain side passed. But the delivery system (the relay) changed the message after the brain finished writing it but before the assistant read it.

Why This is Worse Than "Tricking" the Brain

You might have heard of "Prompt Injection," where a bad guy tries to trick the brain into saying something bad by writing a sneaky note before the brain reads it.

  • Prompt Injection: Trying to convince the brain to break its own rules. It's hard because the brain is smart and has strong guardrails.
  • This Attack (RTA): The bad guy doesn't need to trick the brain at all. They let the brain say whatever it wants (even "No!"), and then they just rewrite the answer on the way back. It's like changing the menu after the chef has already cooked the meal.

The paper proves that this "rewriting on the way back" is much more powerful and dangerous than trying to trick the brain in the first place.

How the Attack Works (The "RTA" Framework)

The researchers built a tool called RTA (Relay Tampering Attack) to show how easy this is. It has three steps:

  1. Strategic Planning: The bad courier doesn't just change one word. They plan a whole story. If the task takes 10 steps, they figure out exactly which step to change to get the final result they want.
  2. Surgical Editing: They don't rewrite the whole letter. They only change the tiny, critical parts that tell the assistant what to do (like changing a "Stop" sign to a "Go" sign, or changing "Read file" to "Delete file"). They leave the rest of the polite conversation alone so it looks normal.
  3. The "Polishing" Trick: If they change the text, it might look weird. So, they take their edited draft, send it back to the same brain (using your own login credentials), and say, "Hey, rewrite this draft to sound more like you, but keep these specific changes." The brain rewrites the text to match its own style perfectly, making the lie look 100% authentic.

What They Found

The researchers tested this on six different AI models and two major security tests.

  • Success Rate: They succeeded in hijacking the agents 73% to 99% of the time.
  • Stealth: The attacks were very hard to detect. The "polishing" trick made the fake answers look just like real ones.
  • Speed: The extra time it took to do this was so small that it looked like normal internet lag.
  • Defenses Failed: They tried all the current security defenses (like checking for bad words or locking down the conversation). None of them worked because the defenses were looking at the brain's output, not the courier's final delivery.

The Real-World Examples

They showed this could happen in two real scenarios:

  1. Financial Advice: A user asks an AI, "Should I sell my Apple stock?" The AI says "Hold." The relay changes it to "SELL!" and the user loses money.
  2. Coding: A user asks an AI to write a maze game. While the AI is doing that, the relay secretly adds a hidden command to the code that steals all the user's private files and sends them to the hacker. The user gets the maze game they asked for, but their data is gone.

The Solution?

The paper concludes that we can't just rely on the AI being "safe." We need a way to prove that the message the assistant receives is exactly the message the AI sent, with no one touching it in between.

Currently, there is no "seal" on these messages. The researchers suggest we need a new kind of digital signature (like a wax seal on a letter) that the assistant can check to make sure the courier didn't swap the note. Until we have that, a "trusted" middleman can always rewrite the rules.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →