The finding
Applications built by AI coding agents carried four times the recorded vulnerability density of established, engineer-built software.
We measured 40 business applications generated by AI coding agents against five large, mature open-source projects that engineering teams have built and maintained for years. The AI-built apps had 397.5 recorded vulnerabilities per 100,000 lines of Python. The established projects had 98.9. Counting only medium severity and above, the gap is five times. For high severity it is six.
No single app pulled the average up. All 40 scored worse than the established projects' pooled rate, the best by 38% and the worst by more than 23 times.
For a dev shop, a defect caught before release is a nuisance and a day of rework. One that gets missed becomes the incident your client's name ends up attached to, with yours underneath. And the defect count matters less than the ratio between how fast the agents write and how fast anyone can still review it.
This is internal Kolega research and the dataset is not published, so this paper is the full public account of it. The method, the totals and the limits are all below, and the limits section is long. Four independent public studies that point the same way follow it.
Why we ran it
Every agency we talk to has made the same move. Client pressure pushed the price down, the agents took over the typing, and the team got smaller. What nobody could tell us was what that trade actually costs in defect terms.
The published research answers part of it. Veracode tests models against security tasks. Apiiro tracks what happens inside enterprise repositories. Neither answers the question a dev shop founder asks, which is simpler and more uncomfortable: if my engineers had written this feature instead of the agent, how much safer would it be?
Nobody can answer that exactly, because nobody rebuilds a 500,000-line system twice to find out. What we could do is measure two things side by side: what agents produce when asked for the kind of business software agencies build every week, and what years of engineering produce in projects everyone agrees are well run.
Method
Two groups of software, counted the same way.
The AI-built apps. Forty applications, each generated end to end by an AI coding agent. They cover ten kinds of business software, the sort a dev shop is asked for every week: a CRM, a learning platform, a lending app, a clinic system, payroll, legal case management, logistics dispatch, a marketplace, property management and a support desk, built in Django or FastAPI. Each was built four times, once by each of four agent setups: Claude Code, Codex, a second Codex configuration labelled "high", and Kimi Code. They are small, about 2,800 lines of Python each.
The established projects. Five large open-source Python projects that engineering teams have built and maintained for years: Airflow, NetBox, Odoo, Saleor and Sentry. Together they come to just under two million lines.
What we counted. Recorded ground-truth vulnerabilities: known flaws tied to specific lines of code, held in the labelled inventories we use to score scanners. A scanner alert is a guess. Each of these is a flaw that has been identified and recorded.
Nothing was planted. The AI-built apps come from a corpus where vulnerabilities are later added on purpose, to test scanners. We measured each app at the commit before anything was added, and kept only findings whose lines trace back to that original code. Six findings pointing at files added later were thrown out. Every vulnerability counted here is one the agent wrote on its own.
How density is calculated. Recorded findings divided by lines of Python code, per 100,000 lines. Lines were counted with cloc 2.06, leaving out blank lines, comments, tests, virtual environments and installed packages.
What stays private. The exact commits and the per-finding detail are internal, and we are not publishing them. The totals, rates and exclusions in this paper are the complete summary.
Results
The AI-built apps carried four times the recorded vulnerability density of the established projects: 397.5 per 100,000 lines against 98.9. That is 4.0 times on the pooled figures, and 3.9 times comparing the median app with the median project.
Kolega internal benchmark, 11 Nov 2026. AI-built apps measured before any vulnerabilities were seeded.
What went into those two rates:
By agent. Every agent setup came out above the established projects, from 2.6 times for the best to 10.9 times for the worst. Take the worst one out altogether and the remaining 30 apps still carry three times the density.
By app. All 40 apps were above the established projects' pooled rate. 39 of the 40 were above Odoo, the densest of the five, and 37 were more than double the pooled rate.
One outlier. Default Codex scored 1,074 per 100,000 lines, far above the other three, and some of that is arithmetic rather than worse code. It wrote about a third as much code per app as Claude Code, roughly 1,400 lines against 4,200, and left slightly more vulnerabilities per app, 14.9 against 11.8. As many flaws in far fewer lines gives a much higher density. Counted per app, the four setups sit closer together than the per-line figures suggest, between 7.5 and 14.9 recorded vulnerabilities each.
Put more simply, the average AI-built app in this benchmark was about 2,800 lines of Python and shipped with 11 recorded vulnerabilities.
The established projects, one by one.
A separate Kolega study points the same way. We built 24 apps on Lovable, Replit and Manus using each platform's defaults and found 561 vulnerabilities, 300 of them critical or high. One build came back clean. That study is about app builders rather than coding agents, so it answers a different question, but the direction matches.
The defects that matter
The count matters, but the kind of defect is what explains why your review process misses them.
Most of what the agents left behind is serious. Of the 443 vulnerabilities in the AI-built apps, 193 were labelled high severity and 249 medium. One was low. In the established projects, about a fifth of the findings were low severity.
Critical: 0.7 in the established projects, none found in the AI-built apps. Low: 20.6 against 0.9. Severity labels were taken as recorded, not harmonised between the groups.
Two cautions on that table. No AI-built app had a finding labelled critical, while the established projects had about 14 across two million lines. And the severity labels were taken as recorded, not harmonised between the two groups: in the AI-built set, 176 of the 443 labels disagree with the band their CVSS score would give. Treat the severity split as indicative and the overall count as the firmer number.
AI-written code tends to be clean at the surface and weak underneath. Syntax is correct, formatting is consistent, naming is sensible. What goes missing is the rule that was never in the prompt, because it lived in someone's head or in a conversation three sprints ago. An endpoint that returns a record will be written correctly. The check that the requester is allowed to see that record is simply absent.
That pattern has a name, broken access control, and it is the hardest class for every tool we have tested, including ours. It is also the class that passes every demo, every acceptance test written from the requirements, and every review that asks whether the feature works.
The published research shows the same shift. Apiiro, tracking Fortune 50 repositories as AI took over the typing, found syntax errors down 76% and logic bugs down 60%, while privilege-escalation paths rose 322% and architectural design flaws rose 153%. In Apiiro's words, AI is fixing the typos and creating the time bombs.
What this benchmark does not break down is the type of flaw. The data is cut by severity, not by vulnerability class, so these numbers cannot say how much of the gap is access control. Apiiro's figures above are the best public evidence on that.
How this sits with the published research
Our number is ours, and a reader is right to treat a vendor's own benchmark carefully, especially one whose data stays private. What makes it credible is that four independent studies, measuring different things with different methods, all point the same way.
Our four times is higher than CodeRabbit's 1.7 times, and the difference is in what was compared. CodeRabbit looked at AI-assisted changes inside existing projects, where human review and the surrounding code still apply. We measured whole applications generated by agents from a blank repository, against mature projects with years of fixes behind them. That is closer to how an agency under price pressure now builds a new client app, and it is the less forgiving comparison.
Our interest. Kolega sells code security tooling. We also author the RealVuln benchmark, whose data and scoring are public. The benchmark in this paper is internal and its dataset is not published, which is why the method and the limits are set out here in full, and why the independent studies above carry real weight.
What it means if you run a dev shop
Four times the vulnerability density would be survivable if nothing else had changed. Three other things did.
The volume went up and the reviewers went down. A developer leaning on agents can generate tens of thousands of lines of viable code a day. Faros AI's telemetry on more than 10,000 developers found that teams deep into AI merge 98% more pull requests while review time rises 91%. Meanwhile the team that used to read the code is smaller, because that is how the price cut was absorbed. More vulnerabilities per line, far more lines and fewer people reading: the three multiply.
The controls go first, quietly. At that velocity, the parts of your process that depended on a human holding the whole picture stop working. Nobody can meaningfully review a day's output against the planned architecture, or check every dependency that arrived with it. What survives is checking the feature against the requirement, which is exactly the check these defects pass.
Your name is still on it. The client asked for the discount, knew you would use AI, and will still hold you responsible for what ships. Your reputation for quality was built by people reviewing each other's work, and that is the mechanism that broke.
None of this means agencies should stop using AI. The market made that decision for you. It means the thing you were quietly relying on, enough human eyes to catch what matters, is gone, and nothing has replaced it yet.
What this benchmark does not show
Six limits, stated here so a reader does not have to find them. The first two matter most.
The two groups are not the same software. We did not build the same application twice. The AI-built apps are small and new, about 2,800 lines each. The established projects are large and old, 200,000 to 600,000 lines each. A small business app is mostly routes, forms and data access, which is where vulnerabilities tend to sit. A large project also carries a great deal of code where they rarely occur. Some of the gap is that difference, and we cannot say how much.
The audits are not equally deep. A 3,000-line app can be read end to end. A 600,000-line project cannot, so its recorded inventory is more likely to be missing flaws. That would make the established projects look cleaner than they are, and the gap wider than it is.
Known flaws only. These are inventories of recorded vulnerabilities, not a prevalence study. Both groups certainly contain flaws nobody has recorded yet.
Five projects, four agent setups. Airflow, NetBox, Odoo, Saleor and Sentry are unusually well run, with long-standing security processes and years of fixes behind them. They are a high bar, and they are not a sample of typical agency code. They are not guaranteed AI-free either, since recent commits may have had AI help. The four agent setups are a snapshot from late 2026 and will change.
Density depends on how much code the agent writes. Findings in templates and configuration are counted against lines of Python only, and an agent that writes terse code scores worse per line for the same number of flaws. Default Codex shows how far that can move a number.
We sell security tooling, and the data is private. The result is in our commercial interest and the dataset is not published. Weigh it accordingly, and against the four independent studies above, which anyone can read.
Sources
- [1]Veracode, GenAI Code Security Report, 2026 edition and October 2026 update.
- [2]Apiiro, 4x Velocity, 10x Vulnerabilities, Sept 2025; The Register, 5 Sept 2025.
- [3]CodeRabbit, State of AI vs Human Code Generation, Dec 2025 (470 pull requests).
- [4]Endor Labs, State of Dependency Management 2025.
- [5]Faros AI, The AI Productivity Paradox Report 2025 (10,000+ developers, 1,255 teams).
- [6]Pellew and Raza, RealVuln: Benchmarking Rule-Based, General-Purpose LLM, and Security-Specialized Scanners on Real-World Code, Mar 2026. Data and scoring at github.com/kolega-ai/Real-Vuln-Benchmark, dashboard at realvuln.kolega.dev.
- [7]Kolega, Vibe Coded & Vulnerable (24 builds across Lovable, Replit and Manus).
- [8]Kolega, Recorded vulnerability density before seeding: five established Python projects and 40 AI-built applications, internal benchmark, 11 Nov 2026. Unpublished.