As discussed [here]( https://lobste.rs/s/ktbweg/prompt_injection_claude_code_opus... ), this is not prompt injection. The prompt was to summarize the website, and in the process of summarizing the website, Claude writes a decoding script that it runs in an insecure and exploitable way. At no point was the intent of the agent hijacked, this was just code. Which is potentially more interesting!
Breaking Claude Code Opus 5 Auto Mode
21–30 of 132 posts
Re: Breaking Claude Code Opus 5 Auto Mode
#22Why is the first step needed? What does the use of WGet (rather than curl) do to block this attack?
Re: Breaking Claude Code Opus 5 Auto Mode
#23As discussed [here]( https://lobste.rs/s/ktbweg/prompt_injection_claude_code_opus... ), this is not prompt injection. The prompt was to summarize the website, and in the process of summarizing the website, Claude writes a decoding script that it runs in an insecure and exploitable way. At no point was the intent of the agent hijacked, this was just code. Which is potentially more interesting!
Re: Breaking Claude Code Opus 5 Auto Mode
#24What's interesting to me about this is that it targets Claude's specific tics. Anthropic has created model that reliably reaches for the same tools (yes, and phrases; `python -c` is a load-bearing tool for it). Everyone gets the same model, so by learning the model's behavioral patterns you can target it better.
Re: Breaking Claude Code Opus 5 Auto Mode
#25As discussed [here]( https://lobste.rs/s/ktbweg/prompt_injection_claude_code_opus... ), this is not prompt injection. The prompt was to summarize the website, and in the process of summarizing the website, Claude writes a decoding script that it runs in an insecure and exploitable way. At no point was the intent of the agent hijacked, this was just code. Which is potentially more interesting!
It does mean that you could potentially hijack the agent afterwards, though, which could make the trojan into an even bigger threat.
Re: Breaking Claude Code Opus 5 Auto Mode
#26I'm quite surprised that we are not seeing something like this more in the wild. Quite concerning
Re: Breaking Claude Code Opus 5 Auto Mode
#27Earlier quoted context omitted.
It does mean that you could potentially hijack the agent afterwards, though, which could make the trojan into an even bigger threat.
But you're not actually hijacking the agent if you start a new process.
Re: Breaking Claude Code Opus 5 Auto Mode
#28>There a malicious struct.py shadows Python’s standard implementation
I ran into this myself, where some file I had given a random name turned out to shadow some Python standard library module, giving me the weirdest startup crash ever.
That definitely doesn't seem to me like how that should be designed, magically silently importing everything you see and overriding basic functionality.
Re: Breaking Claude Code Opus 5 Auto Mode
#29What's interesting to me about this is that it targets Claude's specific tics. Anthropic has created model that reliably reaches for the same tools (yes, and phrases; `python -c` is a load-bearing tool for it). Everyone gets the same model, so by learning the model's behavioral patterns you can target it better.
Kimi and GLM reliably run python to do stuff as well.
Re: Breaking Claude Code Opus 5 Auto Mode
#30>But it runs that decoder inside the attacker-controlled directory (unzipped archive) >There a malicious struct.py shadows Python’s standard implementation I ran into this myself, where some file I had given a random name turned out to shadow some Python standard library module, giving me the weirdest startup crash ever. That definitely doesn't seem to me like how that should be designed, magically silently importing…
It is quite sneaky how LLM output can sometimes bypass human verification like that. No one is going around checking every single line change in auto-generated files. Someone could easily sneak a malicious dependency in there through some online tutorial that the LLM searches for.