AI-Generated Code Found to Contain Security Flaws in Nearly Half of Cases

Thumbnail Image

The information displayed in the AIM should not be reported as representing the official views of the OECD or of its member countries.

A Veracode study of over 100 large language models revealed that 45% of AI-generated code contains known security vulnerabilities, including serious flaws like SQL injection and cross-site scripting. This widespread issue poses significant cybersecurity risks as developers increasingly rely on AI for software development.[AI generated]

Why's our monitor labelling this an incident or hazard?

The article explicitly involves AI systems (LLMs) generating code that contains security vulnerabilities, which are a form of harm to property and potentially to communities relying on secure software. The vulnerabilities are present in the AI-generated code, indicating the AI's use has directly led to these security risks. This fits the definition of an AI Incident because the AI system's use has directly led to significant harm (security vulnerabilities) that can cause or have caused damage. The article does not merely warn of potential future harm but reports on actual security flaws found in AI-generated code, thus qualifying as an AI Incident rather than a hazard or complementary information.[AI generated]
AI principles
Robustness & digital securitySafetyPrivacy & data governanceAccountabilityRespect of human rightsTransparency & explainability

Industries
Digital securityIT infrastructure and hostingGeneral or personal use

Affected stakeholders
Business

Harm types
Economic/PropertyReputationalHuman or fundamental rightsPublic interest

Severity
AI incident

Business function:
Research and developmentICT management and information securityMonitoring and quality control

AI system task:
Content generation


Articles about this incident or hazard

Thumbnail Image

AI-Generated Code Poses Major Security Risks in Nearly Half of All Development Tasks, Veracode Research Reveals

2025-07-30
Eagle-Tribune
Why's our monitor labelling this an incident or hazard?
The article explicitly involves AI systems (large language models generating code) and identifies a direct risk of harm through security vulnerabilities in nearly half of AI-generated code. While no specific incident of harm is reported, the presence of critical security flaws in AI-generated code used in development tasks plausibly leads to security incidents or breaches. Therefore, this constitutes an AI Hazard, as the AI system's use could plausibly lead to harm through exploitation of these vulnerabilities.
Thumbnail Image

AI-Generated Code Poses Major Security Risks in Nearly Half of All Development Tasks, Veracode Research Reveals

2025-07-30
StreetInsider.com
Why's our monitor labelling this an incident or hazard?
The article explicitly involves AI systems (LLMs) generating code that contains security vulnerabilities, which are a form of harm to property and potentially to communities relying on secure software. The vulnerabilities are present in the AI-generated code, indicating the AI's use has directly led to these security risks. This fits the definition of an AI Incident because the AI system's use has directly led to significant harm (security vulnerabilities) that can cause or have caused damage. The article does not merely warn of potential future harm but reports on actual security flaws found in AI-generated code, thus qualifying as an AI Incident rather than a hazard or complementary information.
Thumbnail Image

Veracode 2025 Report: AI Code Vulnerabilities Hit 45% of Tasks, Cut 60% with Oversight

2025-07-30
WebProNews
Why's our monitor labelling this an incident or hazard?
The report explicitly involves AI systems used in code generation, which have directly led to security vulnerabilities that could cause harm to organizations through cyberattacks (harm to property and potentially to communities). The vulnerabilities are realized in AI-generated code, indicating direct involvement of AI in causing potential harm. Although the article also discusses mitigation and recommendations, the primary focus is on the harm caused by AI-generated insecure code. Therefore, this qualifies as an AI Incident due to the direct link between AI use and security flaws that can lead to harm.
Thumbnail Image

Report finds AI-generated code poses security risks

2025-07-30
eeNews Europe
Why's our monitor labelling this an incident or hazard?
The event involves AI systems (large language models generating code) whose use has directly led to security vulnerabilities in software, which constitutes harm to property and potentially to communities due to increased cybersecurity risks. The vulnerabilities introduced by AI-generated code and the facilitation of exploits by AI-powered tools represent realized harms, not just potential risks. Therefore, this qualifies as an AI Incident because the development and use of AI systems have directly led to significant security harms.
Thumbnail Image

Researchers tested over 100 leading AI models on coding tasks -- nearly half produced glaring security flaws

2025-07-30
channelpro
Why's our monitor labelling this an incident or hazard?
The article explicitly involves AI systems (large language models) generating code that contains known security vulnerabilities, which is a direct link to harm (cybersecurity risks). The harm is realized because the flawed code is produced and potentially used, posing risks of exploitation such as SQL injection and cross-site scripting attacks. This fits the definition of an AI Incident as the AI system's use has directly led to harm (or at least a significant risk of harm) to property and communities through cybersecurity vulnerabilities. The research findings confirm the presence of these flaws in AI-generated code, not just a potential risk, so it is not merely a hazard or complementary information.
Thumbnail Image

AI code generators are writing vulnerable software nearly half the time

2025-07-30
NERDS.xyz
Why's our monitor labelling this an incident or hazard?
The article explicitly involves AI systems (large language models generating code) whose outputs have directly led to security vulnerabilities in software. These vulnerabilities represent real, materialized harm risks (e.g., exploitation by attackers, compromised software integrity), fitting the definition of an AI Incident. The AI's failure to reliably produce secure code and the increased ease for attackers to exploit these flaws demonstrate direct harm linked to AI use. The article does not merely warn of potential future harm but documents actual security flaws in AI-generated code, confirming realized harm. Therefore, this is classified as an AI Incident.
Thumbnail Image

LLMs make insecure coding choices for 45% of tasks, study finds

2025-07-30
SC Media
Why's our monitor labelling this an incident or hazard?
The event involves AI systems (LLMs) generating insecure code, which is a direct result of their use. While insecure code generation poses a credible risk of harm (e.g., security vulnerabilities leading to breaches), the article does not report any realized harm or incidents resulting from this insecure code. Therefore, this situation represents a plausible risk of harm due to AI use, fitting the definition of an AI Hazard rather than an AI Incident. It is not merely complementary information because the study focuses on the risk of harm from AI outputs, not just ecosystem updates or responses.
Thumbnail Image

Read This Before You Trust Any AI-Written Code

2025-07-31
Gizmodo
Why's our monitor labelling this an incident or hazard?
The article explicitly discusses AI systems generating code with significant security flaws, which have led to real-world hacking incidents and increased vulnerability to cyberattacks. This constitutes harm to property and data integrity (harm category d). The AI systems' outputs are directly linked to these harms, fulfilling the criteria for an AI Incident. The article also highlights the persistent nature of these vulnerabilities despite improvements in syntax, emphasizing ongoing harm rather than just potential risk.
Thumbnail Image

Almost 50% code written by AI tools contain vulnerabilities: Report

2025-07-31
NewsBytes
Why's our monitor labelling this an incident or hazard?
The involvement of AI systems (large language models generating code) is explicit. The vulnerabilities in the AI-generated code represent a direct risk of harm to property and potentially to users if exploited, which fits the definition of harm (d) to property or communities. Although the harm is not yet realized, the vulnerabilities present a credible risk of exploitation and harm, making this an AI Hazard rather than an Incident. The report highlights the potential for future harm due to insecure AI-generated code, but does not describe actual incidents of exploitation or damage occurring yet.
Thumbnail Image

AI Introduces Security Vulnerabilities Within Code in 45% of Cases

2025-07-31
Security Magazine
Why's our monitor labelling this an incident or hazard?
The involvement of AI systems is explicit: AI is used to generate code that often contains security flaws, and AI-powered tools are used to find and exploit these vulnerabilities. The report indicates that these vulnerabilities are present and being exploited, which constitutes harm to property and systems. Therefore, this qualifies as an AI Incident because the development and use of AI systems have directly and indirectly led to significant security harms.
Thumbnail Image

Nearly half of all code generated by AI found to contain security flaws - even big LLMs affected

2025-08-01
TechRadar
Why's our monitor labelling this an incident or hazard?
The article describes the use of AI systems (large language models) generating code that contains security vulnerabilities. Although no direct harm has yet been reported, the presence of these flaws and the potential for exploitation by attackers constitute a plausible future harm. This fits the definition of an AI Hazard, as the development and use of AI systems could plausibly lead to incidents involving security breaches or other harms. The article does not describe an actual realized harm or incident, nor does it focus on responses or governance measures, so it is not an AI Incident or Complementary Information.
Thumbnail Image

Black Hat 2025: Navigating AI and supply chain security | TechTarget

2025-08-01
TechTarget
Why's our monitor labelling this an incident or hazard?
The article centers on the potential risks and challenges posed by AI in software supply chain security, emphasizing the complexity and need for security measures. However, it does not report any actual harm, incident, or malfunction caused by AI systems. The discussion is forward-looking and strategic, making it a form of complementary information that supports understanding of AI's role in security without describing a concrete AI Incident or AI Hazard event.
Thumbnail Image

LLMs' AI-Generated Code Remains Wildly Insecure

2025-08-01
Dark Reading
Why's our monitor labelling this an incident or hazard?
The event involves AI systems (LLMs) generating code that contains security vulnerabilities, which is a direct harm related to the use of AI systems. The vulnerabilities in AI-generated code can lead to security breaches, exploitation, and harm to property, communities, or users relying on the software. The article describes realized harm in the form of insecure code being produced and deployed, not just potential harm. Therefore, this qualifies as an AI Incident because the AI system's use has directly led to significant security vulnerabilities, a form of harm to property and communities.
Thumbnail Image

45% of AI-Generated Code Vulnerable: Veracode 2025 Report

2025-08-01
WebProNews
Why's our monitor labelling this an incident or hazard?
The event involves AI systems generating code that contains security flaws, which could plausibly lead to harm such as breaches of data security and disruption of software supply chains. Although the article does not report actual incidents of harm, the vulnerabilities identified represent a credible and significant risk of future harm. Therefore, this qualifies as an AI Hazard because the development and use of AI systems in code generation could plausibly lead to AI Incidents involving security breaches and related harms if not properly managed.
Thumbnail Image

AI Still Writing Vulnerable Code

2025-08-01
DataBreachToday
Why's our monitor labelling this an incident or hazard?
The article explicitly involves AI systems (LLMs) generating code and analyzes their security weaknesses, showing that AI-generated code often contains vulnerabilities. This is a direct link to harm (insecure software can lead to breaches, data loss, or other damages). However, the article does not describe a specific event where AI-generated code caused a security breach or harm; rather, it reports on research findings and discusses mitigation strategies. Thus, it does not meet the threshold for an AI Incident but provides valuable complementary information about AI-related risks and responses in software development.
Thumbnail Image

AI Code Flaws: Security Risks in Generated Code - News Directory 3

2025-08-01
News Directory 3
Why's our monitor labelling this an incident or hazard?
The article explicitly involves AI systems (large language models) generating code that often contains security flaws, which can lead to harm such as exploitation by attackers, thus harming software integrity and potentially users relying on such software. This constitutes an AI Incident because the use of AI in code generation has directly led to realized security vulnerabilities, a form of harm to property and potentially to communities relying on secure software. The report's findings and recommendations focus on addressing these harms, confirming the incident classification rather than a mere hazard or complementary information.
Thumbnail Image

Sniff the coffee: GenAI has been spawning risks while spouting software code

2025-08-03
mint
Why's our monitor labelling this an incident or hazard?
The event involves an AI system explicitly described as an AI-powered coding tool used to generate software code. The hacker exploited the AI system's use by submitting malicious instructions that caused the AI to generate harmful code, leading to a direct risk of harm to users' property (deleted files). The incident has already occurred, with Amazon shipping a tampered version of the software, thus constituting realized harm or at least a direct threat of harm. This fits the definition of an AI Incident because the AI system's use and malfunction (manipulation) directly led to harm or risk of harm. The article also discusses the broader implications and risks of AI in software development, but the primary focus is on the realized security breach involving Amazon's AI tool.