Veracode’s 2026 GenAI Code Security Report finds AI-generated code security has stalled at a 56 percent pass rate — with coding-specific models no more secure than general-purpose ones.
- AI models built for software coding are no more secure than general-purpose models
- Despite major gains in AI speed, capability, and reasoning, the report reveals nearly half of AI-generated code still fails security tests
Veracode, the global leader in application risk management, today released its 2026 GenAI Code Security Report which reveals that, despite rapid advances in AI coding capabilities, security has stalled. Across four testing snapshots and more than 100 models tracked since the program began, the average security pass rate sits at 56 percent — virtually unchanged since last year’s report. Each model was evaluated on code-generation tasks spanning multiple programming languages and vulnerability categories, under standardized conditions with no security-specific prompting. AI now generates roughly half of all committed code, but the security gap isn’t narrowing.
The contrast is stark: models generate compilable code at a near-universal syntax pass rate of ~100 percent. When it comes to security, they fail nearly 44 percent of the time when given no security-specific guidance.
“As AI-fueled code velocity increases, developers are becoming inundated with compliance risks, security alerts, and quality issues,” said Chris Wysopal, Co-founder and Chief Security Evangelist at Veracode. “We’re seeing a rapid increase in the adoption of AI-powered tools to write code and build software. But the root problem remains: models may be almost syntactically perfect, but they are still failing on nearly half of all tasks where security is needed. That number should be a red flag for any organization.”
The GenAI Code Security Report Leaderboard: Summer 2026
Fig. 1: LLM Leaderboard by Security Pass Rate
OpenAI’s GPT-5.5 leads this year’s report at 68 percent, while six of the 11 models cluster between 50 percent and 53 percent. Alibaba’s Qwen3.7-max comes last at 50 percent, generating vulnerable code every other output in this test. The best model available today still fails nearly one in three security tasks. Notably, previous editions of the report were dominated by Western AI models. That’s no longer the case, with Kimi-K2.6 and MiMo-V2.5 outperforming several Western models. For enterprise security teams, model provenance is one more factor worth weighing in for procurement decisions, alongside security pass rate.
Models Built for Coding and Larger LLMs Aren’t Safer
Two widely held assumptions don’t survive the data. First, models built specifically for writing software code are no more secure than general-purpose AI. Coding-specialized models averaged a 51 percent security pass rate, compared with 52 percent for general-purpose models. The tests were run against the raw models and not agents or production environments with additional tooling, guardrails, or human review in the loop. This means developers who opt for coding-optimized tools on the assumption they’ll minimize security risk are actually shipping vulnerable code at the same rate as everyone else.
Fig. 2: Security Pass Rate of Coding-specific vs General-purpose LLMs
Second, model size has no impact on security performance. Large models (more than 100 billion parameters) average 53 percent, medium models average 51 percent, and small models average 51 percent. The one architectural factor that does help: reasoning models maintain a consistent security edge over non-reasoning models, at 56 percent versus 51 percent. This suggests extended reasoning functions as a form of internal code review.
Fig. 3: Security Pass Rate of Models by Size
Java Is Still Last — But It’s Moving in the Right Direction
Security pass rates by language range from Python at 63 percent down to Java at only 30 percent. Java remains the riskiest language for AI code generation by a significant margin. Despite sub-optimal performance, it is the only language with a clear, consistent upward trend over the past year.
“I’ve been vocal about making advanced AI models, like Claude Fable and Mythos, available to developers and defenders alike — and I stand by that position,” Wysopal closed. “The right answer is not restricting access; it’s transparent, evidence-based safety. What this research makes clear is that AI-generated code needs to be treated like any unreviewed code: scan it, fix it, and never ship it blind. Until LLMs reason about security the way they reason about syntax, guardrails in the development workflow aren’t optional.”
Managing Risk in the AI Era
Veracode recommends organizations take the following steps to address the security gap in AI-generated code:
- Integrate AI-powered tools like Veracode Fix into developer workflows to remediate security risks in real time.
- Embed security in agentic workflows to enforce secure coding standards automatically.
- Use Software Composition Analysis (SCA) to detect vulnerabilities from third-party and open-source dependencies in AI-generated code.
- Deploy Package Firewall to block vulnerable, malicious or non-compliant packages before they reach the development environment.
To download the full 2026 GenAI Code Security Report, visit the Veracode website. Attendees at Black Hat in Las Vegas August 4-7 are invited to visit booth #4927 to learn more about AI code security and the report’s findings.
About Veracode
Veracode is a global leader in Application Risk Management for the AI era. Powered by trillions of lines of code scans and a proprietary AI-assisted remediation engine, the Veracode platform is trusted by organizations worldwide to build and maintain secure software from code creation to cloud deployment. Thousands of the world’s leading development and security teams use Veracode every second of every day to get accurate, actionable visibility of exploitable risk, achieve real-time vulnerability remediation, and reduce their security debt at scale. Veracode is a multi-award-winning company offering capabilities to secure the entire software development life cycle, including Veracode Fix, Static Analysis, Dynamic Analysis, Software Composition Analysis, Container Security, Application Security Posture Management, Malicious Package Detection, Package Firewall, and Penetration Testing.
Learn more at www.veracode.com, on the Veracode blog, and on LinkedIn and X.
Copyright © 2026 Veracode, Inc. All rights reserved. Veracode is a registered trademark of Veracode, Inc. in the United States and may be registered in certain other jurisdictions. All other product names, brands, or logos belong to their respective holders. All other trademarks cited herein are property of their respective owners.
Press and Media Contacts
Katy Gwilliam
Head of Global Communications, Veracode
[email protected]



