"Vibe coding" started as a joke and became a way of working: describe what you want, let an AI write the code, run it, and keep prompting until it works. With tools like Cursor, Claude Code, GitHub Copilot, Lovable and Bolt, a founder can have a working prototype by the end of the day.
The problem is the word "works". Software that works in a demo can still leak customer data, expose passwords or let a stranger log in as an admin. The research from the past year shows this isn't a rare edge case.
The short version: AI coding tools make software much faster to build, but independent testing shows that close to half of AI-generated code fails basic security checks, and confirmed vulnerabilities traced to AI-written code are rising quickly. AI-built software is safe to ship only with the same discipline as any other code: human review of sensitive parts, automated security scanning, proper secret management and careful control of dependencies.
What the numbers say
Close to half of AI-generated code fails security tests
Veracode has tested more than 100 AI models on coding tasks in Java, JavaScript, Python and C#. In its 2025 report, AI-generated code introduced risky security flaws in 45% of tests. Its 2026 report found that the average security pass rate across four years of testing still sits at about 56%, and that newer, larger models haven't moved it. Java remained the weakest language, with a mean security pass rate of only 30%.
Confirmed vulnerabilities from AI-written code are climbing
Researchers at Georgia Tech built the "Vibe Security Radar", which traces published vulnerabilities back to the code change that introduced them and checks whether an AI tool wrote it. By April 2026, after scanning more than 43,000 security advisories, they had confirmed 74 cases, 14 of them critical.
The trend is what stands out: about 18 cases in the second half of 2025, then 56 in the first three months of 2026. March 2026 alone, with 35, exceeded all of 2025. And that's only what they can see: the tool can't recognize AI-written code once the tell-tale markers are removed.
Secrets are leaking faster
GitGuardian detected 28.6 million new secrets, such as passwords and API keys, in public GitHub commits during 2025, roughly a third more than the year before. Commits made with AI coding assistants leaked secrets at about twice the baseline rate. The same report found more than 24,000 unique secrets exposed in configuration files for MCP, the protocol that connects AI tools to other systems.
AI invents packages, and attackers have noticed
Most code depends on third-party packages, and AI models sometimes recommend packages that don't exist. A study presented at USENIX Security 2025 analyzed 576,000 code samples from 16 models and found that about 20% of them referenced packages that don't exist. Many of the invented names come up again and again, so attackers can register them and wait for someone to install them. The attack even has a name: "slopsquatting".
The most common security problems in AI-built apps
- Secrets in the code. API keys and database passwords pasted into source files, then pushed to GitHub or shipped to the browser.
- Broken access control. Pages and APIs that check whether you're logged in, but not whether you're allowed to see that particular customer's data.
- Injection flaws. Database queries and system commands built by gluing user input into strings.
- Open databases. Backends such as Firebase or Supabase launched with test rules that let anyone read or write everything.
- Unvetted dependencies. Packages added because the AI suggested them and never checked.
- Missing validation. Forms and uploads that accept anything, from huge files to scripts.
How to ship AI-built software safely
1. Review AI code like a junior developer's work
The Georgia Tech team's advice is simple: review AI-generated code the way you'd review a junior developer's pull request, especially anything that handles input or authentication. Someone who understands security should read every change to login, permissions, payments and personal data.
2. Keep secrets out of code
Use environment variables or a secrets manager. Turn on automatic secret scanning for your repository, and rotate any key that was ever committed, even briefly.
3. Scan every change automatically
Run static analysis, dependency scanning and secret detection on every commit, so problems are caught before they reach production instead of after.
4. Check every new dependency
Before installing a package an AI suggested, confirm that it exists, is actively maintained and is the one you meant. Lock versions, and keep a list of what your software depends on.
5. Lock down your backend
Write database security rules for each collection and each role, test them, and never launch with "allow everything" development rules. Give every service the least access it needs.
6. Limit what AI tools can touch
Coding agents that can run commands or reach production credentials are privileged systems. Run them in isolated environments, keep logs, and require human approval for anything that deploys code or changes data.
Palo Alto Networks' Unit 42 sums this up in its SHIELD framework: separation of duties, human-in-the-loop controls, input and output validation, environmental isolation, logging, and defense in depth.
Should you use AI to build your software at all?
Yes, with the right expectations. AI is excellent at prototypes, internal tools, repetitive code, tests and documentation, and it lets experienced developers move much faster. It isn't a replacement for engineering judgment where mistakes are expensive: authentication, permissions, payments and anything that touches customer data.
A practical rule: the closer software is to your customers' data or your money, the more human review it needs.
Frequently asked questions
What is vibe coding?
Vibe coding is building software mainly by describing what you want to an AI tool and accepting the code it generates, often without reading it closely. It's fast for prototypes but risky for production software unless the code is reviewed and tested.
Is AI-generated code less secure than human-written code?
Veracode's testing of more than 100 models found that AI-generated code failed security checks in about 45% of tests, and research on public code shows a fast-rising number of confirmed vulnerabilities traced to AI tools. Human code has flaws too. The difference is speed and volume, which make review and automated scanning essential.
What is slopsquatting?
Slopsquatting is an attack in which criminals publish malicious packages under names that AI coding tools tend to invent. When a developer installs the suggested package without checking it, they install the attacker's code.
I had an app built quickly with AI. How do I know if it's safe?
Start with a security review: scan the code and dependencies, search the repository history for secrets, test the database rules, and check that every page and API enforces permissions. Fix the critical issues before adding new features.
Where to go from here
We use AI tools every day at GTech, and they make us faster. Every change that touches authentication, permissions or customer data still gets human review, automated scanning and tested database rules before it reaches production.
If you have an app that was built quickly with AI and want to know whether it's ready for real customers, ask us for a review, or see how we approach custom software development.
Sources
- Georgia Tech: "Bad Vibes: AI-Generated Code is Vulnerable, Researchers Warn" (April 2026)
- Veracode: 2025 GenAI Code Security Report and 2026 report
- GitGuardian: State of Secrets Sprawl 2026
- Cloud Security Alliance: "Vibe Coding's Security Debt: The AI-Generated CVE Surge" (April 2026)
- Spracklen et al., "We Have a Package for You!", USENIX Security 2025



