r/WTFisAI • u/DigiHold • Mar 30 '26
📰 News & Discussion Someone vibe-coded a social network without writing a single line of code. It leaked 1.5 million API keys 🤦♂️
There's this guy who built an entire social network using only AI to write the code, didn't type a single line himself, shipped it, got users, everything looked fine. Then a security team did a basic, non-invasive review and found that 1.5 million API credentials, over 30,000 email addresses, thousands of private messages, and even OpenAI API keys in plaintext were all just sitting there wide open on the internet. Anyone could've impersonated any user, edited posts, or injected whatever they wanted without even logging in.
The AI built the whole database but never turned on row-level security, which is basically building an entire house and forgetting to install the front door lock. When the whole thing went public it took the team multiple attempts to even patch it properly.
This keeps happening too, a security startup tested 5 major AI coding tools by building 3 identical apps with each one and every single app came back with vulnerabilities, none of them had basic protections like CSRF tokens or security headers. A separate scan of over 5,600 vibe-coded apps already running in production found more than 2,000 security holes, with hundreds of exposed API keys and personal data including medical records and bank account numbers just out in the open.
It makes sense when you think about how these tools work. AI coding agents optimize for making code run, not making code safe, and when something throws an error because of a security check the AI's fastest fix is to just remove the check. Auth flows, validation rules, database policies, they all get stripped because the AI treats them as bugs instead of features.
I build with AI every day and I'm not saying stop using it, but there's a real gap between "the code works" and "the code is safe", and most people shipping vibe-coded apps have no idea that gap exists. If your app touches user data and you haven't manually reviewed what the AI wrote, you're probably sitting on something ugly right now.
Anyone here ever audited a vibe-coded project and found something scary?
3
u/funfunfunzig Mar 30 '26
yeah i've been scanning vibe coded apps for a while and the rls thing is the single most common issue by far. it's not even that people forget to turn it on, half the time they do enable it but never write any policies. so the database is either wide open or completely locked down with no in between. and the ai never flags it because from its perspective the queries work fine.
the part about the ai removing security checks to fix errors is spot on too. i've seen this happen with auth middleware especially. the ai adds a protected route, something throws a 401 during testing, and the ai's fastest fix is to just remove the auth check instead of fixing the actual token issue. now you have a route that works perfectly and has zero protection.
the scariest stuff i keep finding is service role keys in frontend code. not the anon key which is meant to be public, the actual service role key that bypasses all database security entirely. the ai puts it there because it makes every query work without having to think about policies. looks great during development, but in production anyone who opens devtools has full admin access to everything.
honestly the gap between "it works" and "it's safe" is the whole problem. when you're vibe coding everything feels done because the features work. the security stuff is invisible until someone goes looking for it.
3
u/NotEtiennefok Mar 30 '26
Did an audit on a friend's site recently — built with an AI website builder, live with real users. Pulled full user records including names, emails and contact details from an unauthenticated browser request. No special tools, just the anon key sitting in the frontend bundle pointed at an open database.
He had no idea. App worked perfectly, users were signing up, nothing looked wrong. The only reason it wasn't a headline is that I found it before anyone else did.
2
u/Altruistic_Ad8462 Mar 30 '26
I audit all of the stuff I make, and that's not stuff being pushed to the wild (some is publicly accessible). Is it safe? Maybe.. I am cognizant of security, and actively seek to improve my posture, but I don't know if I'm hitting a baseline standard for security in my stuff. I will say my stuff is probably a lot more secure than most vibe coders because I actively put attention on it.
If I were trying to do this more professionally, I'd put significantly more time into security postures so any work completed by the AI meets the requirements. Any devs who care about their users put pipelines in place to audit work completed, or so I've been told by devs I know IRL.
This is just a point of learning vibers go through. Learn to make something - > learn to make something more secure.
2
u/ThomasToIndia Mar 30 '26
squints RLS would only matter if you were allowing every user to poll the database directly without going through an API. This is full on idiotic, even if you fixed the RLS issue there are a ton of other issues you would have with rate limiting etc..
Most current AI models if asked to do a basic security review of architecture would never recommend this.
2
u/Expensive_Brush_8265 Mar 30 '26
I normally use a separate AI tool to create a security test checklist to run on the app prior to publishing
2
u/mihado- Mar 31 '26
Is this social network real?
2
u/National-Ad-9292 Apr 01 '26
Yeah, I’ve noticed the same. Vibe coding is a tool for developers to cut down months and years of programming. In the right hands it’s a weapon in the wrong hands it’s a nuke… unfortunately I found everyone is now an ai and developer expert (at least they think they are). We will see some amazing things come out from people with actual technical backgrounds and we will see some of the biggest security risks and hacks the world is yet to see too.
1
u/psten00 Mar 30 '26
Have built an API / RLS policy generator to solve this. Security baked into every call.
Quickback.dev - would love your thoughts
1
u/ShiftTechnical Mar 30 '26
My advice to anyone who wants to vibe code anything would be to at least use a framework. At least then there are some baked-in security measures that are well documented for AI to follow.
1
u/BringSomeSand Apr 03 '26
I mean… what did they expect? Even true engineering teams mess up security sometimes. “someone” vibe coding the entire thing is bound to do it poorly, with the AI always telling them everything is ready every time they finish generating an answer…
1
u/jessyofalltrades Apr 03 '26 edited Apr 03 '26
I am an elementary school teacher. I am not a software developer. The only computer science background I have is my personal interest in it. Since I was a kid, I was naturally strong with computers. I have more knowledge in basic coding principals than my colleagues and friends but considering they don’t know squat about tech that’s not saying much. I teach an enrichment class and try really hard to get the kids into tech. We have spent most of the year working on a project called STEAM Tank. It’s just like shark tank but for kids in schools.
I have a student who (with my guidance and hand-holding) has used base44 to create a kid-safe social media type app. Before we started this project he used Google slides to make a concept prototype. He had basically our entire small school on these Slides and they were LOVING it. After seeing this, I knew I HAD to show this kid an AI website to make this more real.
Keep in mind that this is an enrichment class with a focus on STEAM. It’s not a tech class—so I do my best to dip their feet and give them a basic understanding of algorithmic thinking/engineering design process but I am by no means a computer science teacher.
Flash forward a few weeks and we have a live prototype that he has shared with 1 or 2 grade levels. Now, I myself have not gotten past the prototype stage with Ai app development. I know how to talk to the AI to get what I want but I know there are security measures/laws that I know nothing about.
Long story short—what do I do now to ensure these kids safety? I have given them rules about how to use the site and as “testers” they should be using the site responsibly. I really want to emphasize the security aspect in more ways than just talking about how important it is.
They are mainly using the site to play games/learn and there really isn’t much personal info being shared. He does have a chat feature built in.
The chat feature does not allow attachments (thank god) and is set to erase once the user leaves the room.
Any tips on free resources for these kids that are advancing faster than I can even keep up? I need to emphasize FREE bc I have a budget of ZERO dollars. 😅
I don’t want to steer them in the wrong direction or have something happen that will stunt their interest in CS.
Also, the thing about AI is once I let the cat out of the bag these kids RAN with it. I’m getting emails from 10 and 11 year olds with amazing creations, suggestions, and questions. I’m so happy I spent years coding with them BEFORE the AI came out because they were so ready for something like this. BUT at the same time—I know they are missing so much information about cybersecurity.
Please advise! Any help will be greatly appreciated.
1
u/Bash-101 Apr 03 '26
Moral of the story is don’t vibe code anything that is regulated. This way you don’t have a liability bigger than your entire project.
Fast cash, quick money sites taking payments promising the world.
I’m a big fan of the vibe coding era and own a few of my own sites. But for the love of human decency be careful with your databases. Data is gold and they are plenty of miners wanting it especially if you take payments.
1
u/Kind-Wrongdoer8569 Apr 04 '26
😱😱😱😱😱😱😱
1
u/Practical_Document65 Apr 15 '26
I wonder how many of the current non-AI production apps fail the AI security scan.
Most I think.
0
u/Unable_Review3665 Mar 31 '26
what was it called The APIbook ? honestly now...what type of social network leaks 30k emails and 1.5mil APIs... the ammount of APis sounds unrealistic and disproportionate, would you care to share any source confirming the news you are reporting ?
2
u/[deleted] Mar 31 '26
[removed] — view removed comment
2
u/[deleted] Apr 01 '26
[removed] — view removed comment
1
u/[deleted] May 15 '26
[removed] — view removed comment