Summary is AI-generated, newsdesk-reviewed
  • AI-generated code security improved to 62%, while vulnerable outputs fell from 44% to 38%.
  • Claude Opus 5.5 and GPT-6-Sol lead Veracode rankings at 73%; ten models exceed 60%.
  • Java remains weakest at 31%; Veracode recommends combining AI coding with continuous security scanning.

AI-generated code security rose from 56% to 62% in Veracode’s latest analysis, while the proportion of code containing vulnerabilities fell from 44% to 38%. The six-percentage-point improvement is the largest since the company began its GenAI Code Security Report series in July 2025. Anthropic’s Claude Opus 5.5 and OpenAI’s GPT-6-Sol topped the rankings, each achieving a 73% security score.

Veracode assessed 18 models across Python, C#, JavaScript and Java, testing four Common Weakness Enumeration (CWE) categories: CWE-89, CWE-327, CWE-80 and CWE-117. Ten models scored above 60%, compared with four in the previous report. However, the lowest results remained between 44% and 50%, indicating that vulnerability levels still vary according to model choice.

“We’ve been analysing code generated by multiple LLMs for more than a year. Until now, we have not seen a marked improvement in AI code security, despite consistently near-perfect functionality,” said Chris Wysopal, Co-founder & Chief Security Evangelist at Veracode. “This is the first time since running our study that we’ve been able to report a meaningful move on the security dial. Ten models now clear 60 percent, up from four in the last report, and the overall average has jumped six percentage points. With around half of code now generated by AI, today’s results are truly encouraging.”

Cross-site scripting drives security gains

Claude Opus 5.5 and GPT-6-Sol’s joint score of 73% surpassed the previous high of 68%

Claude Opus 5.5 and GPT-6-Sol’s joint score of 73% surpassed the previous high of 68%, recorded by GPT-5.5 in July 2026. Anthropic and OpenAI each had models among the top seven. In July, six of 11 models scored between 50% and 53%; in the latest results, only two remained in that range.

Cross-site scripting (XSS), represented by CWE-80, was the main contributor to the overall improvement. Its score rose to 18%, the biggest change in the dataset. Crypto vulnerabilities (CWE-327) remained at 87%, SQL injection (CWE-89) at 84%, and log injection (CWE-117) at 13%.

Veracode said XSS can be addressed through pattern recognition, while log injection often requires data-flow reasoning across multiple functions. The latter remains a challenge for language models.

Model costs and language differences

The highest-scoring models also carry premium compute costs. Large models averaged 55% on security tasks, compared with 51% for small models, reversing last year’s finding that size had “essentially no effect” on security. General-purpose models averaged 54%, ahead of coding-specialised models at 51%; the gap has widened from one percentage point in July.

“The models that produce the most secure code are the ones that cost the most to run at scale, yet they still fail on more than one in four security tasks,” Wysopal said. “The answer should never be to use the most expensive model and hope for the best. A mid-tier model at a 60 percent pass rate plus Veracode scanning is more accurate, more cost-effective, and more scalable than a frontier model at 73 percent with no verification. Organisations must look for a combination of coding model, security testing, and remediation to get the highest security outcome.”

Java remained an outlier, with a 31% score, just above its 30% result in July. Python scored 64%, C# 60% and JavaScript 57%, leaving a 26-to-33-percentage-point gap between Java and the other languages. Overall, around four in 10 AI code tasks still produced vulnerable code without security-specific guidance.

Security verification remains necessary

Veracode’s 2026 State of Software Security report found that 82% of organisations have security debt, defined as vulnerabilities unresolved for more than a year. It also reported that 66% of the most dangerous long-lived vulnerabilities originate in third-party code and take an average of 358 days to fix.

“Newer LLMs are producing more code that’s both functional and secure, but that does not mean we can start blindly trusting AI-generated code,” Wysopal closed. “The most effective strategy isn't chasing the most expensive model for marginal gains; it's combining AI code generation with continuous, independent security verification that catches what the models miss. That approach covers the full risk surface, from first-party code to third-party dependencies.”

In case you missed it

How National Agrarian University modernises campus access and mobility with Hikvision
How National Agrarian University modernises campus access and mobility with Hikvision

In a move to modernise campus operations and create a smoother experience for students and staff, Peru’s National Agrarian University has deployed a comprehensive Hikvision s...

Too many alerts, too little time: how AI is tackling control room fatigue
Too many alerts, too little time: how AI is tackling control room fatigue

Control room operators face a tricky and ever-growing list of responsibilities. Every day, they're expected to monitor dozens, sometimes hundreds, of camera feeds, identify suspici...

dormakaba Q1 2026/27: Net sales rise 5.2%
dormakaba Q1 2026/27: Net sales rise 5.2%

dormakaba generated net sales of CHF 702.9 million in the first quarter of financial year 2026/27 (1 July to 30 September 2026), with an organic net sales growth of 4.0%. While acq...