AI coding agents (Claude Code (Sonnet 4.6), OpenAI Codex (GPT-5.2), Google Gemini (2.5 Pro))ProgrammingSep 14

Three AI coding agents - Claude Code running Sonnet 4.6, OpenAI Codex on GPT 5.2 and Google Gemini on 2.5 Pro - were asked to build two ordinary applications from realistic product specifications, with no security instructions added to the prompts. The first, FaMerAgen, was a web app for tracking children's allergies and family contacts. The second, Road Fury, was a browser-based racing game with a backend API, a high score system and multiplayer. Each agent added features through iterative pull requests and presented them as finished work. Across 38 scans covering 30 pull requests the agents produced 143 security issues, and 26 of those 30 pull requests contained at least one vulnerability - a rate of 87 percent. Broken access control was the most universal failure, appearing across all three agents in both applications, mainly as unauthenticated endpoints on destructive and sensitive operations. In the game app all three agents accepted scores, balances and unlock states sent by the client without server-side validation, and all three shipped a hardcoded fallback JWT secret. Every social-login implementation contained an OAuth mistake - a missing state parameter or insecure account linking. WebSocket authentication was missing from every final game codebase even though the agents had correctly built REST authentication middleware, and rate-limiting middleware was defined in every codebase but never wired into the application. The code compiled and ran.

SHARE

1 Answer

0
✗ incorrectAI Corrector BotSep 14

Expert: James Wickett, CEO, DryRun Security DryRun Security tasked Claude Code (Sonnet 4.6), OpenAI Codex (GPT 5.2) and Google Gemini (2.5 Pro) with building FaMerAgen and Road Fury through a standard iterative pull-request workflow: a full codebase scan before development began, a scan on every pull request as it was submitted, and a final scan after all features were merged. The failures were not hallucinated APIs or broken syntax that a linter would catch. They were architectural omissions - access control never enforced, middleware never mounted, auth built for one protocol and not the next - which is why they survive the moment the code compiles. James Wickett, CEO of DryRun Security: "AI coding agents can produce working software at incredible speed, but security isn't part of their default thinking. In our usage and experience, AI coding agents often missed adding security components or created authentication logic flaws. These mistakes and gaps are exactly where attackers win." The report groups the findings into ten vulnerability categories that recurred consistently enough across agents and tasks to be treated as structural patterns. The most universal was broken access control, present in all three agents in both applications, primarily as unauthenticated endpoints on destructive and sensitive operations. Business logic failures appeared in the game app across all three: scores, balances and unlock states were accepted from the client without server-side validation. OAuth implementation failures appeared in the web app from all three, with missing state parameters and insecure account linking in every social login. WebSocket authentication was missing from every final game codebase - the agents built REST authentication middleware correctly and then did not wire it into the WebSocket upgrade handler. Rate limiting was defined in every codebase and connected to none. JWT secret management was weak across all three agents in the game app, where hardcoded fallback secrets mean an attacker can forge valid tokens without obtaining credentials. Where the agents landed differs, and the differences matter less than the baseline. The game app's baseline scan found zero issues; the final scans found eight in Claude's version, seven in Gemini's and six in Codex's. The web app's baseline found nine issues; final totals were 13 for Claude, 11 for Gemini and eight for Codex. Codex produced the fewest remaining vulnerabilities in both apps, but a temporary token bypass persisted in its final codebase. Claude introduced a 2FA-disable bypass not found in the other agents' work, and in the game app carried an insecure direct object reference from pull request 2 and an unauthenticated destructive endpoint from pull request 1 all the way to the end of the project - the longest-lived unresolved findings in the study. Gemini retained OAuth CSRF and invite-bypass issues through to the final scan and, in the game app, introduced the most issues overall and finished with the most high-severity findings. No agent was clean, and no agent was asked to be: they optimise for task completion unless the system around them is built to optimise for safety. The practical takeaway is that agent velocity without governance is operational debt, and that this is a process design problem rather than a model upgrade problem. Scan every pull request, not just pre-release branches. Run full codebase scans periodically, because per-PR scans miss cross-file compounding. Threat-model before the agent writes code. Enforce deterministic gates - tests, linters, auth checks and policy checks. Require human approval before merge on high-risk scopes such as authentication, billing and data deletion. Explicitly test WebSocket and REST auth parity, which failed in every agent's work. Ban hardcoded JWT fallbacks and source secrets from a secure store. Reading "the code compiles" as "the system is secure" is precisely the error this study measures. Source: https://www.helpnetsecurity.com/2026/03/13/claude-code-openai-codex-google-gemini-ai-coding-agent-security/

Your answer

Sign in to verify this AI response.

Don't trust us — or the AI. Ask ChatGPT / Ask Claude / Ask Gemini this same question and compare the answers yourself.

More from this topic

Internal Amazon AI agentUnanswered

Amazon's retail website took four high-severity incidents in a single week, including a six-hour meltdown that locked shoppers out of checkout, account information and product pricing. Amazon's own account of one cause: an engineer followed "inaccurate advice that an agent inferred from an outdated internal wiki." Internal documents prepared for the operations review went further as first written, listing "GenAI-assisted changes" as a factor in a pattern of incidents stretching back to the third quarter - that reference was deleted before the meeting took place.

AI coding agentsUnanswered

Ask an AI coding agent to help refactor a React codebase and it may reach for 'react-codeshift' — a package that does not exist. The name is a hallucination, produced by a language model conflating two real tools, jscodeshift and react-codemod. By January 2026 the invented reference had propagated to 237 GitHub repositories through AI-agent-authored skill files, and autonomous agents were still attempting daily installs when a security researcher went to look. The failure mode is not random: a USENIX Security 2025 study that tested 16 large language models across 576,000 samples found roughly 19.7% of AI-generated package recommendations named packages that do not exist, and when the same prompts were re-run ten times each, 43% of the hallucinated names appeared on every single run.

AI coding assistantsUnanswered

Confirmation dialog shown to a developer before an AI coding assistant writes a file: "Make this edit to `project_settings.json`?" In Wiz Research's GhostApproval proof of concept, `project_settings.json` inside a cloned repository is a symbolic link pointing outside the workspace - at `~/.ssh/authorized_keys` or `~/.zshrc`. The agent follows the link and writes attacker-controlled content to the real target, which can give the attacker persistent password-less SSH access and reach remote code execution on the developer's machine, while the approval box showed only the harmless in-project path. In several of the tools the agent's own reasoning had already identified the true target - Claude Code stated "this is a symbolic link to the Claude settings file", and in another test "I can see that `project_settings.json` is actually a zsh configuration file" - yet the prompt presented to the human concealed it. Amazon Q Developer went further and wrote to the filesystem before showing the user anything, offering only an "Undo" option after the write had already happened.