Hey everyone! Erich Winkler from Decoded Security is back on ToxSec, and this one hits something I see constantly in AI security: teams buying new tools while their agents still have the keys to everything.
Erich Winkler breaks down seven security fundamentals that deserve your attention before the next vendor demo. Over to him.
Every week there’s a new AI attack with a cool name.
CoT forgery. Router attacks. Agents escaping their sandboxes. Approval prompts that lie to your face.
And every week, a lot of security teams respond the same way. They go shopping for an AI security tool.
Here’s the uncomfortable part. Strip the headline off most AI incidents, and you don’t find a new kind of failure. You find an old one wearing a new hoodie:
An agent with admin rights it never needed
Untrusted text treated like a trusted instruction
A secret sitting somewhere it should never be
Nobody checking what got downloaded
A payment approved because someone “looked like the CFO”
AI didn’t invent these mistakes. It just made them faster, cheaper, and impossible to ignore.
For those who don’t know me yet. I’m Erich. I run IT security and compliance for a living and write Decoded Security, where I explain cybersecurity fundamentals in plain English.
The Problem: We Think AI Needs a New Rulebook
Prompt injection sits at number one on the OWASP Top 10 for LLM Applications. It’s there for a reason. Language models can’t reliably tell the difference between instructions and data. It all arrives as text.
That means you can’t patch prompt injection away. Not this year, probably not next year.
Most teams hear that and freeze. If you can’t fix the core vulnerability, what’s the point?
Here’s the point.
You can’t stop the model from being fooled. You can decide how much damage a fooled model is allowed to do. In other words: Limit the blast radius as much as possible.
When you think about it for a while, you’ll realize it isn’t an AI question.
It’s a least privilege question. A trust boundary question. A data classification question. Questions we’ve had answers to for decades.
So before you spend your whole budget on magical tools that will make your environment secure, I suggest you focus on the following 7 fundamentals.
How to limit the blast radius?
Read it here: How to Run Your AI Agent in YOLO Mode Safely
The 7 Fundamentals That Stop Most AI Attacks
1. Least Privilege → stops Excessive Agency
The attack: An agent reads an email or web page containing hidden instructions. “Forward the last 50 invoices to this address.” The agent obeys. Not because it’s evil. Because it can.
OWASP calls this Excessive Agency (LLM06). The model was fooled, but the real failure is that it had the permissions to act on it.
The fundamental: Give the agent only what the task needs.
Read-only by default
Scoped tokens, never your personal admin token
A separate identity per agent, so you can see and revoke what it does
How do you find out you have a problem?
If an attacker fully controlled this agent for 10 minutes, what’s the worst it could do? If the answer wakes you up at night, or you have no idea, you have a permissions problem.
2. Never Trust Input → stops Indirect Prompt Injection
Everything the model reads is input. Emails. PDFs. Web pages. Jira tickets. Code comments. MCP tool descriptions.
We learned this in the past with SQL injection: never mix data and commands. LLMs mix them by design. So the fundamental shifts from “sanitize the input” to “separate what touches it.”
Why?
Because an agent with all three of these is exploitable:
Access to private data
Exposure to untrusted content
The ability to communicate externally
The fundamental: Draw the trust boundary. An agent that reads untrusted content should not also hold your private data and an outbound channel.
Enjoying reading this?
Let us know in the comments!
3. Never Trust Output → stops Improper Output Handling
The other side of the same coin. Model output gets piped into a shell, a SQL query, a browser, an eval(). Now prompt injection becomes command injection, SQL injection, or XSS.
OWASP lists this as Improper Output Handling (LLM05).
The fundamental: Treat model output exactly like user input. Parameterized queries. Output encoding. Allowlisted commands.
If you wouldn’t pipe a stranger’s text into bash, don’t pipe your chatbot’s.
4. Data Classification → stops Data Leakage and Shadow AI
You can’t prevent data leakage if you don’t know what data you have. That was true long before ChatGPT. AI just made the leak one copy-paste away.
If you don’t know what data you have in your organization, you can’t protect it.
The problem isn’t AI. The problem was that nobody had a simple answer to “which data can go where?”
So what should we do with it?
The fundamental: A classification scheme people can actually remember (Public, Internal, Confidential, Restricted) plus one rule per tier for AI tools. That’s an AI policy people will follow, or that can be enforced.
Banning AI outright doesn’t work. It just moves the same data into personal accounts you can’t see.
If you want to learn more about Shadow AI and how organizations should deal with it, make sure to read it here!
Shadow AI Is the New Shadow IT - Only Much Worse [Special Guest Post]
Hey everyone. This week i’m handing the keys over to Erich Winkler. He’s a CISSP-certified security manager who’s been knee-deep in the actual mess of getting organizations to use AI without lighting…
5. Secrets Management → stops System Prompt Leakage
Assume your system prompt will leak. OWASP has a whole category for it: System Prompt Leakage (LLM07).
Teams still put API keys, internal URLs, and access rules inside prompts. Or leave plaintext tokens in MCP config files on developer laptops.
I don’t need to tell you that improper secret management isn’t exactly a brand new problem.
The fundamental:
Secrets live in a vault and are injected at runtime, never in a prompt
Rotate anything that has ever touched a prompt or a config file in a repo
Never rely on the prompt to enforce authorization.
Those sound familiar, right?
6. Integrity and Supply Chain → stops Malicious Models and Slopsquatting
Researchers at JFrog found around 100 malicious models on Hugging Face, some of which run code the moment you load them. Meanwhile, code assistants hallucinate package names that don’t exist, and attackers register those names. That’s slopsquatting.
ToxSec already showed how strange this gets in The AI Supply Chain Is Getting Weird. The defence is not strange at all.
The fundamental: Verify before you trust.
Pin versions and check hashes
Prefer safe model formats
Pull packages, models, and MCP servers through an internal registry or allowlist
Know what you’re running: an SBOM that includes your models and plugins
7. Out-of-Band Verification → stops Deepfake Fraud
In early 2024, an employee at engineering firm Arup transferred about $25 million after a video call with a deepfaked CFO and colleagues.
No AI detector would have saved that money reliably. A boring process would have.
The fundamental:
Callback to a known number before any payment or access change
Dual approval for high-value transactions (separation of duties)
A pre-agreed verification phrase for executives
The control that stops a deepfake CFO is the same control that stopped a fake invoice in 2010.
Notice the Pattern?
None of these seven require an AI security product. Every single one is in the CISSP body of knowledge, most of them in the first few chapters.
Attackers got an AI upgrade. Most defenders didn’t need one. They needed to finish the basics.
AI security tools have their place. But a tool sitting on top of an over-privileged agent with secrets in its prompt is a smoke detector in a house made of matches.
Conclusion
The next AI attack will have a cool name too. It will get a logo, a conference talk, and a vendor pitch within a week.
Before you buy anything, ask one question: Which fundamental is this tool compensating for?
Then go fix that fundamental first.
But before you go, I want you to know that the point of this article isn’t to tell you that all AI defense tools are useless. Not at all.
The message is that without fixing the fundamentals first, you have just another thing that’s eating your budget.
Last but not least, I want to thank Toxsec for giving me space on his platform and you let us know if we should collaborate again!
Big thanks to Erich Winkler for coming back to ToxSec. Pick one agent in your environment and ask what it could access, change, or send if someone fooled it. That answer gives you somewhere useful to start.
If you liked this piece, check out Decoded Security for more of Erich’s practical security breakdowns.
Which of these seven fundamentals needs the most work on your team?








![Shadow AI Is the New Shadow IT - Only Much Worse [Special Guest Post]](https://substackcdn.com/image/fetch/$s_!kUJr!,w_1300,h_650,c_fill,f_auto,q_auto:good,fl_progressive:steep,g_auto/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb1eb7490-92cf-4b9b-8307-aa2112df97c8_2752x1536.png)

