Skip navigation
🏴‍☠️this is how your vibecoded app gets hacked...
0:00 / 1:43

🏴‍☠️this is how your vibecoded app gets hacked...

Burak Eregar

@burakeregar7.8K followers

Visit on X
2,660 likesDownloadOriginal post

236,017 views

🏴‍☠️this is how your vibecoded app gets hacked... let's hack a website together i'll show you why "trusting client" fallacy can cost you 1000s of dollars thread to learn how to avoid this:

44 Comments

Comments from the original post on X (Twitter)

  • Burak Eregar's profile picture

    @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

  • Burak Eregar's profile picture

    @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

  • Burak Eregar's profile picture

    @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

  • Michael Stan's profile picture

    @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

  • Burak Eregar's profile picture

    @burakeregar

    wow 🤯 sorry to hear that. an expensive lesson

    5 likes

  • ronald jabouin's profile picture

    @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

  • Burak Eregar's profile picture

    @burakeregar

    number of apps with these critical vulnerabilities is insane

    13 likes

  • OKTRA's profile picture

    @oktra_dev

    Server side validation has to be done

    20 likes

  • Burak Eregar's profile picture

    @burakeregar

    non negotiable

    10 likes

  • bmj🐂🀄️'s profile picture

    @BmjCrypt0_

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

    12 likes

  • Burak Eregar's profile picture

    @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

  • viswC's profile picture

    @Viswa_vaageesh

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

    6 likes

  • Burak Eregar's profile picture

    @burakeregar

    💪

    1 like

  • Can (ジャン)'s profile picture

    @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

  • yotam's profile picture

    @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

  • Eduardo Borges's profile picture

    @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

  • Nathan's profile picture

    @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

  • Burak Eregar's profile picture

    @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

  • Nathan's profile picture

    @NathanField

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

    7 likes

  • Ben's profile picture

    @ben_codez

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

    3 likes