Skip to main content
3.4x More Vulnerabilities: An AI Codegen IncidentIncident
4 min readFor Security Engineers

3.4x More Vulnerabilities: An AI Codegen Incident

What Happened

Between 2023 and early 2025, organizations using AI code generation tools shipped applications with known vulnerabilities at much higher rates than their peers. This wasn't limited to one company or sector. Organizations where AI generated 81-100% of production code deployed known vulnerabilities at 3.4 times the rate of those where AI contributed just 1-20%.

This wasn't a breach. It was a systematic erosion of code quality happening faster than security teams could measure it. The root cause? Code velocity outpaced security validation. Developers using GitHub Copilot completed tasks 55.8% faster than those without AI assistance, according to Microsoft Research. That speed advantage translated into a security debt most teams didn't know they were accumulating.

Timeline

Q1 2023: AI coding assistants become mainstream. Security teams continue using traditional SAST tools calibrated for human-written code patterns.

Q2-Q4 2023: Code volume increases 40-60% in organizations adopting AI assistants. Deterministic scanners flag known patterns but miss novel vulnerability combinations introduced by AI-generated logic.

Q1 2024: Measurements show vulnerability density correlating with AI code percentage. Security teams realize their scanning infrastructure can't keep pace with AI-generated code diversity.

Late 2024: Anthropic demonstrates Claude Mythos Preview creating a working Firefox exploit within an hour of Mozilla shipping the patch. Attackers are using AI to weaponize vulnerabilities faster than defenders can identify them.

Early 2025: Organizations with 80%+ AI-generated code face a choice: slow development or rethink their security validation approach.

Which Controls Failed

Static scanning coverage: Traditional SAST tools rely on signature-based detection. They're built to recognize patterns from historical vulnerability databases. When AI generates code in unfamiliar patterns or combines languages in novel ways, deterministic scanners miss the vulnerabilities entirely. Your SAST tool wasn't designed to evaluate code it's never seen before.

Code review effectiveness: Human reviewers can't maintain quality standards when reviewing 55% more code in the same timeframe. If your team reviewed 10,000 lines per week before AI adoption, you're now reviewing 15,500 lines. Without added headcount or reduced review depth, something's getting missed.

Security testing cadence: Most organizations run security scans at specific gates (PR submission, pre-merge, pre-deploy). When developers ship code 55% faster, those gates process 55% more commits. Your scanning infrastructure becomes the bottleneck, creating pressure to skip scans or accept findings without remediation.

Vulnerability prioritization: Security teams triage findings based on exploitability timelines developed from human attacker behavior. Those timelines are obsolete. When AI can generate a working exploit in under an hour, your 30-day remediation SLA for "medium" findings becomes a liability.

What Standards Require

PCI DSS v4.0.1 Requirement 6.3.2 mandates that custom software be developed securely based on industry standards and incorporating information security throughout the software development lifecycle. The requirement doesn't specify scan types, but it does require security activities to be "defined and documented." If your documented process assumes human-speed code generation and human-speed exploit development, you're not meeting the requirement's intent.

OWASP ASVS v4.0.3 Section V1.14 requires that the build pipeline warn on known vulnerable components. When AI generates code using deprecated libraries or insecure patterns, your pipeline needs detection mechanisms beyond signature matching. The standard expects you to catch "known" vulnerabilities, but AI-generated code creates unknown combinations of known patterns.

NIST 800-53 Rev 5 Control SA-11 (Developer Testing and Evaluation) requires organizations to test and evaluate software for security flaws. The control specifies testing at "multiple levels of detail." If your testing strategy only includes deterministic scanning, you're not achieving multiple levels of detail when facing AI-generated code.

ISO/IEC 27001:2022 Control 8.25 (Secure Development Lifecycle) requires security to be integrated throughout development. When development velocity increases 55% but security validation capacity remains static, you've created a gap between the control's requirement and your actual implementation.

Lessons and Action Items

Audit your AI code percentage: You can't manage what you don't measure. Instrument your repositories to track what percentage of each commit comes from AI assistants. If you're above 60%, you're in the high-risk category for this vulnerability pattern.

Add behavioral scanning: Deterministic scanners find known patterns. You need tools that analyze code behavior, not just signatures. This means incorporating dynamic analysis (DAST) earlier in your pipeline and exploring AI-enhanced scanning that can identify novel vulnerability combinations.

Recalibrate your SLAs: Your remediation timelines assume attackers need weeks to weaponize a CVE. They don't. Critical findings need same-day remediation. High findings need 48 hours. Anything longer gives AI-assisted attackers too much advantage.

Right-size your review process: If code volume increased 55%, either increase review capacity or implement tiered review. Not every AI-generated function needs human review. But authentication logic, cryptographic operations, and input validation absolutely do. Define your review tiers explicitly.

Test your scanning coverage: Take a known vulnerable code sample. Have your AI assistant refactor it into three different language patterns. Run all three through your SAST tool. If it only catches one pattern, you've identified a gap.

Build an AI code policy: Define which types of functions AI assistants can generate without additional review. Authentication, authorization, cryptography, and payment processing should require human verification regardless of who (or what) wrote the initial code.

The 3.4x vulnerability rate isn't inevitable. It's the result of applying human-speed security validation to AI-speed code generation. Close that gap, and you'll ship faster without shipping vulnerable code.

Topics:Incident

You Might Also Like