AI can find zero-days but still can’t reliably write secure code
AI models now find hidden security flaws but still fail to write secure code, creating a gap between their offensive and defensive capabilities.
Overview
AI models have become very good at finding security flaws that humans and traditional tools missed for years, but they are not getting better at writing secure code. A study by Veracode found that 44% of AI-generated code contains at least one known OWASP Top 10 vulnerabilityA flaw in software or hardware that lets an attacker do something the maker did not intend. Even the best models tested only had a 68% security pass rate, meaning they still produced insecure code once every three tries. This creates a dangerous gap where AI can find and exploit holes in software much faster than it can help fix them. Software Improvement Group also found that AI-generated code produces roughly two times the security risk violations compared to human-written code. Organizations using AI to speed up software development now face a situation where the tools they use to build software may also be creating new security risks.
Terms in this story
- vulnerability
- A flaw in software or hardware that lets an attacker do something the maker did not intend. Security advisories report a vulnerability when researchers or attackers find a coding mistake in an app or server that allows someone to break in or crash it. Security+ objective 2.3 lists the term
- zero-days
- A software flaw that becomes known or used in attacks before the maker has released a fix. Security stories call a bug a zero-day when attackers exploit it in the wild while the software company has had zero days to write and ship a patch. Security+ objective 2.3 lists the term
- LLMs
- An AI system trained on huge amounts of text to generate, summarize, translate, or write code. Security news covers large language models both when defenders use them to review code and when attackers try to trick chatbots into leaking private company documents.
- open-source
- Software whose source code is publicly available for anyone to inspect, use, modify, and share. Most websites and apps rely on hundreds of open-source code libraries, so a single security flaw or malicious update in a popular library can affect thousands of companies at once.
- bug bounty programs
- A reward program where a company pays independent researchers who responsibly report security flaws in its systems. Through a bug bounty program, ethical hackers can test a company's websites and apps under clear rules and earn cash rewards for finding bugs before criminals do. Security+ objective 4.3 lists the term
- security audit
- A formal, systematic review of an organization's code, configurations, logs, and policies against security standards. Companies hire outside specialists to conduct a security audit before launching a major product or to prove to customers and regulators that their controls work. Security+ objective 4.3 lists the term
- patches
- A software update released by a developer to fix a bug or close a security flaw. When a software flaw is discovered, the vendor ships a patch so administrators and ordinary users can update their systems before attackers exploit the bug. Security+ objective 4.3 lists the term
- frontier models
- The largest, most capable generation of general-purpose artificial intelligence models. Researchers and governments test frontier AI systems before release to see whether they can discover software vulnerabilities on their own or help novices plan cyberattacks.
- exploit code
- A piece of code or technique that uses a software flaw to break into or crash a system. Finding a vulnerability is only the discovery of a weakness, whereas an exploit is the working code or sequence of inputs that triggers that weakness in practice. Security+ objective 2.4 lists the term
- security controls
- The technical rules, tools, and policies put in place to prevent, detect, or limit cyberattacks. Network firewalls, multifactor authentication, disk encryption, and regular backups are all security controls that auditors check after an incident. Security+ objective 1.1 lists the term
- technical debt
- The accumulated burden of old code, shortcuts, and outdated dependencies that make software harder to maintain. When technical debt piles up over time, organizations get stuck with brittle servers and ancient software libraries that no one dares update until an attacker exploits them. Security+ objective 4.7 lists the term
This page is a short description made for this site. The article itself, with its author's name and its own link, is on the CSO Online website. Cite the article, not this page.
Read the full article on CSO Online (opens in a new tab)
Course connections
Each line below connects this story to a Security+ objective (a skill on CompTIA's Security+ exam, a common first cybersecurity certification), a CYBR 101 week, or a cybersecurity job, and quotes the words that made the connection.
- Kind of story: Research and reports
AI models' offensive and defensive capability gaps... Found by reading the article; these words are close to its own - Who is affected: "Enterprises are facing a critical cyber asymmetry issue..." Organizations using the product
Copied word for word from the article - Security+ 2.3 Explain various types of vulnerabilities.
"AI can find zero-days but still can’t reliably write secure code..." Found in the headline - Security+ 2.4 Given a scenario, analyze indicators of malicious activity.
"......despite these advances in vulnerability discovery and exploit..." Found in the opening sentences - Security+ 4.3 Explain various activities associated with vulnerability management.
"......have gone from flooding open-source projects and bug bounty programs with questionable security reports that wasted developers'..." Found in the opening sentences - Security+ 5.5 Explain types and purposes of audits and assessments.
"......zero-day flaws that humans and traditional security audit tools had missed for years - a..." Found in the opening sentences - CYBR 101 week 1: the course, logins and two-factor sign in, cyber roles and jobs
"......recent months, LLMs have gone from flooding open-source projects and bug bounty programs with questionable security..." Found in the opening sentences - CYBR 101 week 11: penetration testing, OSINT, MITRE ATT&CK and hacking back
"......have gone from flooding open-source projects and bug bounty programs with questionable security reports that wasted developers'..." Found in the opening sentences - CYBR 101 week 2: the CIA triad, threat actors, risk and CVEs
"AI can find zero-days but still can’t reliably write secure code..." Found in the headline - CYBR 101 week 6: AI, how it is attacked, and what it does for attackers and defenders
"AI can find zero-days but still can’t reliably..." Found in the headline
How a story is connected to the course, and every objective, week and job role