Veracode says AI-generated code security improved, but major gaps remain
Veracode’s benchmark of 18 models found that the overall AI-generated code security score rose from 56% to 62%, while observed vulnerability rates fell from 44% to 38%. Claude Opus 5.5 and GPT-6-Sol jointly led with 73% scores, but even they failed more than one in four security tasks; Veracode said much of the overall gain came from easier-to-recognize XSS flaws, while complex data-flow reasoning remained difficult.
Veracode recommends combining AI-generated code with continuous independent security verification before deployment, arguing that a mid-tier model paired with scanning may be more accurate and scalable than an unverified frontier model.
- AI-generated code security improved for the first time in a year, with vulnerability rates dropping from 44% to 38%
- Top models performed better at preventing common flaws like XSS, but still struggled with complex security reasoning
- Researchers stress AI-generated code still requires independent security testing and verification before deployment
Computer code generated by frontier AI models has gotten more secure and consequently - contains fewer vulnerabilities.
This is according to a new report by Veracode, which claims this is the first significant improvement in a year.
In July 2025, Veracode started releasing its GenAI Code Security Report, which analyzed code generated by LLMs for vulnerabilities and security risks. Since then, the company’s researchers noticed a trend - the code was functioning almost perfect, but on the security side it left much to be desired.
Are XSS flaws worth the trouble?
“We’ve been analyzing 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.
#Veracode#Claude Opus 5.5#GPT-6-Sol#GPT-5.5#Anthropic#OpenAI