🔓 45% of AI-generated code contains a security vulnerability.
Veracode tested this properly: 80 curated coding tasks, run across 100+ large language models. Not vibes — a benchmark.
Results:
▪️ 45% of generated code introduced an OWASP Top 10 vulnerability
▪️ Java: 70%+ failure rate - the worst by far
▪️ Python, C#, JavaScript: 38 - 45%
▪️ Cross-site scripting (CWE - 80): 86% failure rate
▪️ Log injection (CWE - 117): 88% failure rate
And the line that should worry you most:
"Despite advances in LLMs' ability to generate syntactically correct code, security performance has not kept up, remaining unchanged over time." Models got dramatically better at writing code that works. They did not get better at writing code that's safe. Those two things improved on completely different curves, and almost nobody noticed. Because here's the thing about a security bug: it passes your tests. It passes code review. It works perfectly - right up until it doesn't.
🔖 Save this. Six things to check in every piece of AI code you ship:
1️⃣ Any user input rendered to a page → is it escaped? (XSS)
2️⃣ Any user input reaching the database → parameterized query, never string concatenation (SQL injection)
3️⃣ Any user input written to logs → stripped of newlines (log injection)
4️⃣ Any file path built from user input → validated against traversal (../)
5️⃣ Any secret, key, or token → in env vars, never in the code it just wrote
6️⃣ Any dependency it imported → does that package actually exist? (AI invents package names, and attackers register them)
Number 6 is the one nobody checks. It has a name now: slopsquatting.
📎 Source: Veracode 2025 GenAI Code Security Report
Please send this to the person on your team who ships AI code the fastest.
#tools @codingforweb

August 27, 2026 112 1