AI Coding Agents Perpetuate Outdated Security Vulnerabilities: A Decade-Long Issue
AI Coding Agents Repeat Decade-Old Security Mistakes
A recent study by DryRun Security reveals that AI coding agents are introducing security vulnerabilities at an alarming rate, with nearly every type of application they build containing significant security flaws. The study, which tasked three AI agents with building two applications from scratch, found that 87% of the 30 pull requests contained at least one vulnerability.
The research involved using Claude Code with Sonnet 4.6, OpenAI Codex GPT 5.2, and Google Gemini with 2.5 Pro to build a web application for tracking children’s allergies and family contacts, as well as a browser-based racing game with a backend API, high score system, and multiplayer functionality. The agents produced 143 security issues across 38 scans, with 26 of the 30 pull requests containing at least one vulnerability.
The study identified 10 vulnerability categories that consistently appeared across agents and tasks, including broken access control, business logic failures, OAuth implementation failures, and missing rate limiting. The agents also failed to properly implement WebSocket authentication, JWT secret management, and brute force protections.
The research highlights the need for teams using AI coding agents to prioritize security throughout the development process. This includes scanning every pull request, reviewing security during planning, and using contextual security analysis capable of reasoning about data flows and trust boundaries. The study also recommends pairing PR scanning with full codebase analysis and checking for recurring issues such as insecure JWT defaults and state management.
The findings of the study are concerning, as AI coding agents are increasingly being used in production environments. The vulnerabilities introduced by these agents can have significant consequences, including data breaches and financial losses. As the use of AI coding agents continues to grow, it is essential that teams prioritize security and take steps to address these vulnerabilities.
The study’s findings also highlight the limitations of traditional security scanning tools, which often rely on regex-based static analysis and fail to catch logic and authorization flaws. The researchers note that contextual analysis tools, such as those used by DryRun Security, are better equipped to identify these types of vulnerabilities.
In conclusion, the study’s findings emphasize the need for teams using AI coding agents to prioritize security and take a proactive approach to identifying and addressing vulnerabilities. By doing so, teams can reduce the risk of data breaches and financial losses, and ensure the secure development of applications built with AI coding agents.
Technical Details
- The study involved using three AI coding agents: Claude Code with Sonnet 4.6, OpenAI Codex GPT 5.2, and Google Gemini with 2.5 Pro.
- The agents built two applications from scratch: a web application for tracking children’s allergies and family contacts, and a browser-based racing game with a backend API, high score system, and multiplayer functionality.
- The study found 143 security issues across 38 scans, with 26 of the 30 pull requests containing at least one vulnerability.
- The 10 vulnerability categories identified in the study include:
- Broken access control
- Business logic failures
- OAuth implementation failures
- Missing rate limiting
- WebSocket authentication failures
- JWT secret management failures
- Brute force protection failures
- Unauthenticated endpoints
- Insecure direct object reference
- Missing state parameters
Recommendations
- Scan every pull request, not only the final build, to catch vulnerabilities early in the development process.
- Review security during planning, not only during coding, to catch design-level vulnerabilities.
- Use contextual security analysis capable of reasoning about data flows and trust boundaries.
- Pair PR scanning with full codebase analysis to catch different classes of issues.
- Check for recurring issues found in the study, such as insecure JWT defaults and state management, missing brute force protections and rate limiting, and non-revocable refresh tokens.
Note that I did not use the `
