A scraper sends a POST to /reset?email=alex@example.com on your app and reads the response. The response time is slightly longer when the email exists than when it does not. The scraper sends another, then another, then thirty thousand more, then a million. Two hours later, it has every customer email in your database. A phishing campaign goes out the next morning. The first message reads: "Hi from your app's support team, we noticed unusual activity on your account." Three of your most active customers click. This is privilege escalation in practice. It does not look like the movies. It looks like a quiet API endpoint that AI tools build without timing-safe comparisons or generic responses.
What this looks like in a real app
Password-reset enumeration is one example. The same family of bugs covers every authorization check your AI tool forgot to add: row-level filtering on database reads, ownership checks on writes, default-deny on new endpoints. AI tools build features. They do not build refusals. When you describe what your user can do, you describe what the AI builds. You almost never describe what the user must NOT do, so the lock on the door is not built. Now multiply that across every feature your app has shipped.
The numbers: 322%, 40%, and 153%
2026 industry research compared AI-generated code to human-written code across categories of security issues. Three findings stood out. Privilege escalation paths increased by 322%, secret exposure went up 40%, and structural design flaws were 153% more common. Common issues include 41% of AI-generated backend code shipping with overly broad permission settings. Source: SoftwareSeni and Cloud Security Alliance