🏴☠️this is how your vibecoded app gets hacked...
@burakeregar7.8K followers
236,017 views
44 Comments
Comments from the original post on X (Twitter)

@burakeregar
rule #1: treat every client as hostile never trust roles, prices, user ids, flags, or limits coming from the frontend. the client only requests. the server decides.
154 likes

@burakeregar
rule #2: enforce everything server side auth, authorization, validation, rate limits. recalculate sensitive values. check ownership. assume requests can be replayed, modified, or forged.
126 likes

@burakeregar
rule #3: ui restrictions are not security hidden buttons, disabled inputs, and “this won’t be called” assumptions do nothing. if it matters, enforce it on the backend.
98 likes

@Michal_Stan
Rule #1 should be tattooed on every founder's forehead. I trusted my retail system's frontend validation in 2015. "Nobody would manipulate inventory counts through the browser, right?" Wrong. Lost £14k to a single compromised session before I caught it. Server-side everything. No exceptions. Ever.
32 likes

@burakeregar
wow 🤯 sorry to hear that. an expensive lesson
5 likes

@ronaldjabouin
I found a similar trick on an AI tool. They gave non logged in users a few free uses but the endpoint was unprotected, so I could run it as many times as I wanted via the API
21 likes

@burakeregar
number of apps with these critical vulnerabilities is insane
13 likes

@oktra_dev
Server side validation has to be done
20 likes

@burakeregar
non negotiable
10 likes

@BmjCrypt0_
Dropped a follow. would love to ask a few questions about an app I’m building if possible🙏🏼
12 likes

@burakeregar
feel free to ask them here if they are not private so others can benefit as well if they are, my dms are open
20 likes

@Viswa_vaageesh
im going to use rule #2 to tell claude to remove these if vulnerablities exist. thanks
6 likes

@burakeregar
💪
1 like

@CanKirsallioba
Yeah, I feel like this was engraved to me in college and masters by our professors. So these kind of secure coding practices feels like second nature now.
4 likes

@yotamha1
Was just thinking about how valuable it is for someone to do what you’re doing in this way, thanks for this Amazing lessons Would be cool to see your vibe coding approach to security for non tech users of Claude maybe in the form of a SKILL
4 likes

@duborges
very cool, but I think AI will do a better job than humans tbh AI knows client is not safe (at least recent models like opus 4.5 are good at protecting it) and even if a few models might still fail, it’s just a matter of time (months) for vibe coding be safer than any manual senior dev coding just like tesla cars will be safer than regular ones, they are less prone to errors when tired
4 likes

@NathanField
Good breakdown. So how do you fix this? Send a check to your auth base and check how many credits that user has before firing?
3 likes

@burakeregar
client sends a request to backend to start generation backend checks the database to see if user has an active subscription and enough credits if so, backend starts the generion frontend must be as dumb as possible. just shows stuff on UI and makes requests, not decisions
51 likes

@NathanField
Legend, thanks for clarifying. Created my first app last week, 99% sure it's set like that.
7 likes

@ben_codez
This is more about basic programming knowledge than vibe coding per se. The backend should always be in control. Basic.
3 likes






















