I’ve been tracking the security implications of AI-assisted coding for the past two years, and the data is now clear enough that we need to have an honest conversation about it.
The Hard Numbers
Veracode’s latest research shows that 45-48% of AI-generated code contains security vulnerabilities. But that’s just the headline. The details are worse:
- 62% of AI-generated solutions contain design flaws or known security vulnerabilities, even when developers use the latest models
- Java code has the highest security failure rate at over 70%
- Python, C#, and JavaScript fail at 38-45%
- Even Claude Opus 4.5, the current leader on BaxBench, produces secure code only 56-69% of the time
The Productivity Paradox
Here’s where it gets interesting. Teams using AI assistants see 20% more PRs per author. But incidents per PR are up 23.5%.
A Stanford study found that 15-25% of the productivity gains from AI are eaten up by rework - much of it security-related.
We’re shipping faster, but we’re also shipping more bugs.
The CVEs Nobody Talked About
In August 2025, Microsoft patched CVE-2025-53773 - a remote code execution vulnerability in GitHub Copilot itself. Through prompt injection, attackers could modify your .vscode/settings.json and achieve full system compromise.
Pillar Security discovered the “Rules File Backdoor” attack - hackers can inject hidden malicious instructions into configuration files that Cursor and Copilot read, causing them to insert malicious code that bypasses typical code reviews.
What I’m Seeing in the Wild
The most common issues I find in AI-generated code:
- Missing input sanitization - by far the most frequent
- Improper password handling - AI often suggests weak patterns
- Insecure object references - authorization bypasses
- Missing null checks and guardrails - edge cases ignored
In 45% of test cases, LLMs introduce vulnerabilities classified in the OWASP Top 10.
The Question We Need to Answer
Cursor is generating 1 billion lines of committed code per day. If your organization generates 100,000 lines of AI-assisted code this year, roughly 25,000 lines will contain security flaws.
Most security teams already can’t keep pace with manually-written vulnerabilities. What happens when we 3x the vulnerable code output?
I’m not arguing against AI coding tools. I use them. But I’m seeing organizations adopt them without updating their security practices, and it’s creating a growing backlog of vulnerabilities.
How are your teams handling AI code security? What processes have you put in place?