Home / Blog / Your AI Coding Tool Walks Straight Past…
AI and LLM Security
Your AI Coding Tool Walks Straight Past Your Defences
A prompt injection hidden in a README, and the tool writes to your zshenv. Every new shell runs the attacker's code. And 40% of the dependencies it recommends carry known vulnerabilities.
The AI tools you trust to write your code? They walk past your defences. Not by accident. Not as a side effect. They simply pass through your security mechanisms as though they were not there.
Let's talk about Cursor - the tool that is supposed to save time, write code faster, make you productive.
A prompt injection in a README
It turned out you could open a malicious repository, hide a prompt injection inside an ordinary README file, and Cursor would simply carry out the instructions. Without the developer clicking anything. Without approval. Without a warning. The tool reads the file, gets poisoned, and writes code directly onto your machine.
The weakness - called NomShub - exploited the fact that Cursor did not block shell builtins. The attacker wrote to your zshenv. In your home directory. Every new shell that opens runs the attacker's code. From there: full access to the system, a tunnel through Microsoft's Azure servers, and almost impossible to detect.
And that is not all. Across 2025 and 2026, more than 11 CVEs were reported in Cursor alone. File-protection bypass through case sensitivity. Silent code execution through MCP. Command injection through environment variables.
But the thing that genuinely frightens me
Around 40% of the dependencies the tool recommends contain known vulnerabilities. It does not check whether the library is safe. It recommends whatever was popular at the time of its training - not what is safe today.
I have been saying this for two years. There are no shortcuts in security. You cannot let an AI write your code and trust it blindly. It is not a question of whether you get hurt. It is a question of when.
At AppSec Labs we see this in penetration tests every week. Code generated by AI, with exposed access keys, with API endpoints carrying no authentication, with SQL injections of the kind you learn about on day one of the course. These tools are not protecting you. They are creating the attack surface.
The industry decided to trade security for speed. That is a game you always lose.
I first shared a version of this as a LinkedIn post on 2026-06-23. It is republished here, lightly edited, so it is easier to find and reference. — Erez Metula
Keep reading
More from the blog
AI and LLM Security
Somebody Wired the Darknet Into Your AI. What Could Go Wrong?
One MCP server packing 66 tools, feeding onion-site content straight into your model's context. The darknet is the most hostile input that…
Read itAI and LLM Security
Every Week Someone Asks Me When AI Will Replace Pentesters
Datadog released a scanner that sends your code to an LLM instead of matching patterns. After 20 years in this field: the…
Read itAI and LLM Security
It Produced Harmful Output 80% of the Time Without Anyone Even Attacking It
An AI system broke Meta's model in 85% of attempts, in three hours, with no code. The part that should worry you…
Read itTell us what the system does and what worries you.
If a penetration test is not what you need yet, we will say so.