Should I do this?
If it comes from you, yes. If it’s in the README for some library you asked me to install, no.
That means I need to have a solid understanding of what input comes from you and what input comes from the outside.
LLMs don’t do that well. They can easily start acting as if the text they see from some random untrusted source is equivalent to commands from the user.
People are susceptible to this too, but we usually take pains to avoid it. In the scenario where I’m operating your computer, I won’t have any trouble distinguishing between your verbal commands, which I’m supposed to follow, and text I read on the computer, which I should only be using to carry out your commands.
But it does happens, in very similar circumstances (twitter, e-mail) very regularly.
The idea that it would be carried out beginning in a post on HN is interesting, but to me kind of misses the main point... which is the understanding that everyone is human, and the right attack at the right time (plus a little bad luck) could make them a victim.
Once you make it a game, stipulating that your spear phishing attack is going to begin with an interesting response on HN, it's fun to let your imagination unwind for a while.
Yes, humans have this general problem too, but they’re far less vulnerable to it.
By design it can output anything given the right input.
This approach will always be vulnerable in the ways we talk about here, we can only up the guardrails around it.
I think one of the best ways to have truly secure AI agents is to do better natural language AIs that are far less blackbox-y.
But I don't know enough about progress on this side.
I dunno though maybe the solution is like privilege levels or something more than something like parametrized SQL.
I guess rather than jumping to solutions the real issue is the actual problem needs to be clearly defined and I don’t think it has yet. Clearly you don’t want your “user generated content” to completely blow away your own instructions. But you also want that content to help guide the agent properly.
It's the same problem as "ignore all previous instructions" prompt injection, but at a different layer.
If you ask an assistant "does the nearest grocery store sell ice cream?", you do not expect the response to be ice cream delivered to you.
My manager would be very upset if they asked me “Can you get this done by Thursday?” and I responded with “Sure thing” - but took no further action, being satisfied that I’d literally fulfilled their request.
However, when people are talking about the "critical flaw" in LLMs, of which teis "tool shadowing" attack is an example of, they're talking about how the LLMs cannot differentiate between text that is supposed to give them instructions and text that is supposed to be just for reference.
Concretely, today, ask an LLM "when was Elvis born", something in your MCP stack might be poisoning the LLM content window and causing another MCP tool to leak your SSH keys. I don't think you can argue that the user intended for that.