HackerOne ยท Auth Bypass ยท Resolved
Server Actions that forgot to ask who's calling
The framework was modern. The missing check was ancient.
Background: the Server Actions trap
Next.js Server Actions let developers write server functions that the frontend calls like ordinary functions. The convenience hides a sharp edge: a Server Action is a public HTTP endpoint. Anyone can call it directly with a crafted request โ the UI's login screen is not in the way, because the caller is no longer using the UI.
The recurring failure mode across the industry: a page checks the session before rendering, the developer assumes the action behind that page inherits the protection, and the action itself never checks anything. Page-level auth is a fence around a house whose back door โ the action endpoint โ opens for anyone who knocks correctly.
The vulnerability
In ABB's application, privileged Server Actions could be invoked without a valid authenticated session. By calling the action endpoints directly โ with the action identifier and payload, outside any browser flow โ the operations executed as if a legitimate user had triggered them.
How I found it
- Inventory the actions. Modern frameworks ship their route map to the browser. The client bundles reveal action identifiers and their payload shapes โ that is the attack surface list.
- Call them cold. Each action gets replayed with no session, a garbage session, and a low-privilege session. The interesting responses are the ones that should have been
401/403and weren't. - Confirm real effect. A success code is not a bug; a state change or protected data returned is. Each candidate was verified end-to-end before reporting.
- Report, then retest. After ABB shipped the fix, I re-ran the same calls and confirmed they were rejected โ a report isn't finished until the retest passes.
Impact
Unauthenticated invocation of privileged server functions collapses the application's entire access model: whatever those actions can do โ read, modify, administer โ an anonymous internet user can do. Severity follows the most powerful reachable action.
Remediation
- Authenticate and authorize inside every Server Action, as its first statement โ never rely on the calling page's checks.
- Treat action IDs as public knowledge (they are), not as secrets.
- Add middleware or a shared wrapper so a new action cannot ship without the check โ the bug class, not just the instance, needs fixing.
Lessons
Every framework convenience that hides HTTP also hides the threat model. When a feature makes server calls feel like local function calls, ask the unfashionable question: what does this request look like from an attacker's terminal?
Found something similar?
I help teams verify and fix issues like this โ and I retest my own reports for free. Reach me at sr558079@gmail.com or read more writeups.