Building apps was once a skill that was reserved for the techy software devs among us. But now, anyone can build a working app in an afternoon with AI. But at what cost? The speed is real, and so are the security flaws it leaves in its wake. The National Cyber Security Centre’s CEO, Richard Horne, delivered a keynote speech in March 2026, warning that vibe coding is a major opportunity but not without risk.
Over the past few years, our consultants at Sencode have tested a wide variety of vibe-coded apps and SaaS apps built on platforms like Lovable, Replit, and Supabase. This blog post delves into what they find, why it happens and how to harden apps before they go live.
What is a vibe-coded app?
OpenAI founding member and computer scientist Andrej Karpathy coined the term vibe coding. A vibe-coded app is software built mainly by prompting AI models in English, rather than writing code. A person can simply describe what they want and rely on the models to generate the code until they get the desired result.
The key difference from traditional software development is that the creator often hasn’t read or can’t understand the code behind it. The main focus is whether the app works.
Is vibe coding safe?
Vibe coding is generally considered unsafe without strict review and proper security controls. It is safe for prototypes and experiments, but putting an app in front of real people and real data is a huge risk.
What the research says:
- Deng, Fan and Meng, Understanding the (In)Security of Vibe-Coded Applications, arXiv, June 2026, sampled 200 vibe-coded web apps; 76% contained critical or high vulnerabilities. In over 20% of tests where the agent knew about the mistake, it shipped the insecure code anyway.
- Astra Security built the same app with four AI app builders and confirmed 137 vulnerabilities across them, with broken access control the most serious.
This research backs up our own experience at Sencode when testing vibe-coded apps. The problem here isn’t that AI writes terrible code. It’s that the human builders often don’t understand the security requirements or how to fix them. AI is only as good as the prompts it receives, and even then, agents still have structural blind spots, which makes them unreliable.
What our pen testers find in vibe-coded apps.
Here are some issues that our penetration testers at Sencode find time and time again when testing vibe-coded apps.
- Access controls enforced on the front end only – This is by far the most serious and common issue we see. Apps hide buttons and pages based on a user role but have little or no matching server-side check. The interface may seem locked down, but users can call the API directly to access data or take actions outside their permissions.
- Exposed secret API keys in front-end JavaScript – Anyone who loads the app can inspect these files, extract the secret keys, and use them to access the services or data they protect.
- Excessive information disclosure – Overly detailed error messages often reveal an app’s internal workings, showing attackers where to focus. Debug features and development can expose even more. In one test we completed, a /security page meant to reassure clients about the app’s security instead displayed almost the entire contents of its Django settings.py file.
- Injection vulnerabilities – We’ve seen generated code misuse frameworks or bypass their built-in protections, such as output escaping. This leads to cross-site scripting (XSS), where attacker-supplied input runs in another user’s browser. Email templates are another weak point. When user input goes into outgoing emails without escaping, attackers can change the wording, links and appearance of emails sent by the app.
- Prompt injection in AI chatbots – We’ve found prompt injection weaknesses in 100% of AI chatbots we’ve tested, and apps which use older models have often been more susceptible to misuse. Prompt injection happens when attackers use malicious instructions—typed into a chat or hidden in documents the assistant reads—to push the AI beyond its intended behaviour.
Why are AI-generated apps so vulnerable?
AI tools are built to answer prompts and produce code that works. If security isn’t part of the prompt, it won’t consider it. But that isn’t the full picture.
- AI optimises for working code. Researchers from Carnegie Mellon and Columbia gave AI coding agents 200 real-world tasks. The best set-up produced working code 61% of the time, but only 10.5% was both working and secure.
- It learns from insecure examples. Most public code already contains bugs, and models are trained on that. One 2022 study linked the flawed code a model produced to the flawed data it was trained on.
- Nobody reviews the code. A huge majority of people building these vibe-coded apps don’t come from a software development background. Therefore, they can’t interpret coding mistakes. Even AI itself can’t be trusted to mark its own homework.
- Speed outpaces security. The beauty of vibe coding is just how quickly it can produce a working app. As the hype around vibe coding grows, so does the scale and spread of vulnerabilities.
AI-generated code also poses a longer-term risk, as it is harder to maintain. An analysis of 623 million code changes found duplicated code up 81% and refactoring down 70% since AI tools took off. When the people building these apps don’t fully understand them, keeping them secure gets harder with each update.
How to harden an app built with Lovable, Bolt, Cursor or Replit?
Whichever tool you’re using, these checks will help you get your app closer to production-ready. Remember, no amount of prompting will replace the judgement of professional developers and security experts.
- Search the codebase for API keys, passwords and tokens. Move them into environment variables or your platform’s secrets manager, and rotate any key that has ever been committed or exposed in the browser.
- If you use Supabase or Firebase, switch on row-level security or security rules for every table. Test that one user can’t see or edit another user’s records.
- Don’t rely on hiding buttons in the interface. Each API route should check who the user is and what they’re allowed to do.
- Limit login attempts, sign-ups, password resets and any feature that costs you money, such as AI or SMS calls. Some platforms (Such as Supabase) have many security features.
- Treat anything a user sends as untrusted, including file uploads, form fields and URL parameters.
- Remove test accounts, verbose error messages and admin shortcuts before going live.
- Ask your AI tool to review its own code for security issues, but treat the answer as a starting point, not a sign-off.
- Automated scans miss logic flaws like broken access control. A CREST-accredited pentest checks your app the way a real attacker would, before real users and real data are at risk.
Testing before launch
Vibe coding certainly isn’t going anywhere. Even seasoned software developers are embracing AI tools in their work. If you’ve built an app using AI, Sencode can help you stress-test its security before launch. Our consultants regularly test vibe-coded platforms and apps to uncover issues that slip through the cracks. Finding these vulnerabilities is common. Getting ahead of them will help you get over the line faster. Explore our penetration testing services in depth, covering web and API, mobile and more.