Client-side Authentication Bypass#2371
Open
carlospolop wants to merge 1 commit into
Open
Conversation
Collaborator
Author
🔗 Additional ContextOriginal Blog Post: https://kuldeep.io/posts/client-side-authentication-bypass Content Categories: Based on the analysis, this content was categorized under "Pentesting Web -> Login Bypass / Account Takeover, potentially as a subsection on Client-side Authentication & Authorization Bypass in SPAs". Repository Maintenance:
Review Notes:
Bot Version: HackTricks News Bot v1.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Automated Content Update
This PR was automatically generated by the HackTricks News Bot based on a technical blog post.
📝 Source Information
🎯 Content Summary
The blog post explains how to turn scattered unauthenticated API endpoints and weak frontend-only checks into stronger, clearer bug bounty reports by demonstrating a complete client-side authentication/authorization bypass. The recurring flaw is that applications used JavaScript route guards, browser storage, UI flags, or API-response values as the source of truth for authentication and authorization, while the backend APIs still accepted unauthenticated or unauthorized reque...
🔧 Technical Details
Fake SPA authentication state in browser storage. If a single-page application protects routes using metadata like
authRequired: trueand a frontend helper such asisUserLoggedIn(), inspect the bundled JavaScript to find the exact storage keys and validation logic. If the function only checks attacker-controlled values such aslocalStorage.getItem("token")and whethertokenExpiryis in the future, authentication can be bypassed by setting those keys manually in DevTools. This becomes a real vulnerability when backend APIs do not validate the token/session server-side.Infer expected token formats from frontend parsing code. Search JavaScript bundles for strings like
token,SET_TOKEN,SET_ID,authRequired,isUserLoggedIn, and storage key names. Token-handling code may reveal that the frontend expects a JWT-like structure by ...🤖 Agent Actions
Using repo exploration to find the best existing web auth bypass page and avoid duplicating current content.
I’m updating the existing Login Bypass page because the blog describes frontend-only authentication/authorization checks that unlock restricted UI or actions without real server-side validation.
I found an unintended duplicate References block at the top during diff review; fixing it now so the page keeps references only at the end.
Updated
src/pentesting-web/login-bypass/README.md.Added a new subsection:
It covers:
localStorage/sessionStorageis_activeAlso added the blog URL to the file’s final
## Referencessection.Validated:
This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.