Insecure JSON Web Token (Exposed in URL)
- CWE 598
- CWE 200
- OWASP 2025-A06
- OWASP 2025-A07
A token is part of a URL, in the query string, the path or a redirect target. URLs are stored and shared in many places that are not designed to protect credentials: browser history, server and proxy access logs, analytics tools, bookmarks, and the Referer header that is sent to third party sites.
Anyone who can read one of these copies can use the token for as long as it is valid.
Remediation
Move the token out of the URL. Send it in the
Authorizationheader, in aSecure,HttpOnlycookie or in the body of a POST request.Use short lived, single use tokens for links that cannot avoid carrying one, such as e-mail confirmation links.
Set
Referrer-Policy: no-referrer(orsame-origin) on pages that have to handle such URLs and keep them out of third party scripts and analytics.
References
Search Vulnerability
You may also see
- Insecure JSON Web Token (Unsigned)
- Insecure JSON Web Token (Weak Signing Secret)
- Insecure JSON Web Token (Missing Expiration)
- Insecure JSON Web Token (Excessive Lifetime)
- Insecure JSON Web Token (Sensitive Claims)
- Insecure JSON Web Token (Untrusted Key Reference)
- Insecure JSON Web Token (Exposed in URL)
- Insecure JSON Web Token (Cleartext Transmission)
- Insecure JSON Web Token
- Insecure Session Management