JSON Web Tokens (JWT)
JSON Web Tokens (JWTs) are a compact, URL-safe format for transmitting signed claims between parties, defined in RFC 7519. They consist of three Base64-encoded parts — header, payload, and signature — and are most commonly used for stateless authentication and session management in modern web and API applications. Their flexibility is also their biggest source of bugs.
JWT vulnerabilities typically come from flawed validation rather than from the spec itself. Servers that accept the "alg": "none" header skip signature verification entirely. Servers that accept multiple algorithms can be tricked into algorithm confusion attacks — for example, treating an RSA public key as an HMAC secret. The "kid" header has been a recurring source of SQL injection, path traversal, and arbitrary file read. Weak HMAC secrets fall to brute force in minutes with tools like jwt_tool. And even libraries that get the basics right have repeatedly shipped regressions that re-enable old attacks years later.
Storage and lifecycle introduce a second class of risk: tokens kept in localStorage are XSS-readable, refresh-token rotation is often skipped, and revocation is rarely implemented because JWTs are designed to be stateless. RFC 8725 ("JWT Best Current Practices") exists specifically because the original spec left too much room for unsafe defaults.
This page collects PortSwigger's JWT research and Web Security Academy labs, the major open-source testing tools (jwt_tool, jwt-pwn, jwtXploiter, c-jwt-cracker), CVE writeups, OWASP cheat sheets, and bug bounty methodologies for attacking JWT-based authentication.
From OWASP JWT Cheat Sheet
A JWT is a signature format that people use as a session store
Most JWT problems start with a design decision rather than a coding error. The token is chosen because it is stateless, that statelessness is the property that makes revocation impossible, and then a revocation requirement appears — logout, password change, a disabled account — and gets met with a server-side deny list, at which point the system is stateful again with extra steps. It is worth asking early whether a session identifier against a store would simply be better; for many applications it would.
The implementation failures are well catalogued and still found regularly.
The alg header is attacker-controlled input, which produced two
classic attacks: none, where a library treats an unsigned token
as valid, and the RS256-to-HS256 confusion, where a verifier that selects the
algorithm from the header uses the public key as an HMAC secret — a key the
attacker also has. Both are fixed the same way: decide the expected algorithm
server-side and refuse anything else. Weak HMAC secrets are brute-forceable
offline against a captured token, and a surprising number are dictionary
words.
Key resolution is the subtler surface. jku and
x5u point at a URL the verifier will fetch, and
jwk embeds a key in the token itself; honouring any of these
without strict allowlisting lets the attacker supply the key their signature
verifies against. kid is a lookup value that has produced path
traversal and SQL injection where it was used to fetch a key.
Claim validation is where otherwise-correct implementations lose. A
verified signature only establishes that some holder of the key issued the
token — exp, nbf, iss and
aud all still need checking, and a token valid for one service
accepted by another is a real and common finding in microservice estates.
Storage is the last piece: localStorage exposes tokens to any
XSS, while cookies need the CSRF story handled. Neither is free.
| Date Added | Link | Excerpt |
|---|---|---|
| 2026-11-19 NEW 2026 | I Changed USER to ADMIN in a JWT. Here’s Why the API Rejected It. intermediate API Sec AuthN | The author investigated a JSON Web Token (JWT) vulnerability where changing a user's role from "USER" to "ADMIN" was attempted. Despite the modification, the API rejected the token. This implies the API likely employs robust validation mechanisms that go beyond simply checking the role within the JWT payload. The rejection suggests server-side checks are in place, possibly verifying the token's signature, expiration, or even cross-referencing the user ID with their actual permissions in a database, rather than trusting the claims within the token alone. |
| 2026-11-19 NEW 2026 | Tensei auth bypass via hard-coded JWT secret news AuthN Secrets | Tensei versions up to 0.11.5 have a critical authentication bypass vulnerability due to a hard-coded JWT secret. This allows attackers to forge JWT tokens, granting them unauthorized access to protected areas of the application. The vulnerability arises from the predictable nature of the hard-coded secret, making it easy for attackers to craft valid tokens. This flaw poses a significant security risk, enabling unauthorized privilege escalation and data breaches within affected Tensei deployments. |
| 2026-11-18 NEW 2026 | Stop Reading JWT Claims Everywhere in Your Angular Application intermediate AuthN | This article by Dipak Ahirav, published in Angular Engineering, advises against repeatedly reading JSON Web Token (JWT) claims throughout an Angular application. The core idea is to efficiently handle JWT data by implementing a centralized, reusable solution for accessing claims, thereby improving performance and maintainability. |
| 2026-11-18 NEW 2026 | CIRCUTOR PowerStudio: JWT alg=none identity forgery intermediate AuthN | This content describes a vulnerability in CIRCUTOR PowerStudio where the JWT `alg=none` setting allows for identity forgery. The research involved autonomous multi-LLM vulnerability analysis, providing root-cause explanations and reproducible Proof-of-Concepts for zero-day Remote Code Execution (RCE) chains. These vulnerabilities were found across various enterprise systems, including ICS/SCADA, ERP, and NMS products. |
| 2026-11-18 NEW 2026 | Why Your Logout Button Doesn’t Log Out a JWT intermediate AuthN | Logout buttons typically don't truly log out a user from a JWT system because JWTs are signed tokens that remain valid until their expiration date. Even if a user logs out, the token itself, holding the "promise" of their identity, persists. To achieve actual logout, systems must invalidate the token on the server-side, often through a denylist, as the client-side deletion of the token doesn't revoke its validity with the server. |
| 2026-11-18 NEW 2026 | CVE-2026-120387: PowerStudio SCADA JWT signature validation bypass news AuthN | Library for detecting authentication bypass vulnerabilities in SCADA systems. It highlights CVE-2026-120387, an improper JWT signature verification flaw in CIRCUTOR PowerStudio SCADA WAVE desktop version. This vulnerability allows remote attackers to bypass authentication by submitting an unsigned JWT with the algorithm set to "none," leading to unauthorized access and privilege escalation by impersonating other users. |
| 2026-11-18 NEW 2026 | A token can be valid and still not be meant for your API intermediate API Sec AuthN | A token can be valid according to its format and expiration but still be invalid for a specific API if it was not intended for that API. This occurs because tokens can be issued for different audiences or purposes. An API should verify not only the token's signature and expiration but also that it was issued for its specific audience. This ensures that even a technically valid token cannot be used to access resources it was not authorized for. |
| 2026-11-17 NEW 2026 | 5 JWT Authentication Bugs I Keep Seeing in Django REST Framework Projects intermediate AuthN Python | The article highlights five common JWT authentication bugs found in Django REST Framework projects, based on 14 years of production debugging experience. It provides actionable fixes for these vulnerabilities. The focus is on practical solutions to secure JWT implementation within Django applications. |
| 2026-11-17 NEW 2026 | JWT Login in Spring Boot 4 Without jjwt or a Custom Filter intermediate | This article demonstrates how to implement JWT authentication in Spring Boot 4 without relying on external libraries like jjwt or custom filters. The author highlights that Spring Security, out-of-the-box, provides all the necessary components for this setup. The implementation is presented through four concise classes, suggesting a streamlined approach to integrating JWT-based login. |
| 2026-11-17 NEW 2026 | JWT attacks: forging the token itself (Bug Bounty Field Manual day 12) intermediate 12 min read Bug Bounty | Library detailing JSON Web Token (JWT) attacks, focusing on forging the token itself to bypass authentication and escalate privileges. Techniques covered include exploiting the "none" algorithm, RS256 to HS256 algorithm confusion (CVE-2015-9235 in jsonwebtoken), `kid` parameter injection (path traversal, SQL injection), `jku`/`x5u` header injection for SSRF, embedded `jwk` injection, and exploiting weak or default secrets. These vulnerabilities often arise from improper implementation of JWT verification logic rather than cryptographic weaknesses. → hacklido.com |
| 2026-11-16 NEW 2026 | CVE-2026-62374: SD-JWT JS verification bypass news 2 min read AuthN | CVE-2026-62374 is a verification bypass vulnerability in OpenWallet Foundation's SD JWT JS library versions 0.19.0 and earlier. This flaw, stemming from permissive UTF-8 decoding and missing reference checks in @sd-jwt/core and @sd-jwt/decode, allows attackers to bypass cryptographic verification and perform silent claim-set reduction attacks by tampering with disclosures or presenting unreferenced ones. Remediation involves upgrading to @sd-jwt/core 0.20.0 and enforcing strict validation. |
| 2026-11-16 NEW 2026 | fast-jwt empty-key unsigned-accept model (CVE-2026-107720) news 3 min read Python | Analysis of CVE-2026-107720 in fast-jwt presents an offline, deterministic Python model that re-implements the verifier logic. This model demonstrates the bug path where `createVerifier` accepts empty or null keys with a non-empty algorithm allowlist, and also the corrected behavior. It reproduces JavaScript semantics in Python helpers to model key checks, distinguishing between the pre-fix `ACCEPT` for empty keys and the post-fix `invalidKey` behavior. The analysis includes 18 test cases covering various key and algorithm combinations, outputting results to CSV files. |
| 2026-11-16 NEW 2026 | Authlib accepts OpenSSH keys/certs as HMAC secrets intermediate AuthN Python | Advisory for authlib.jose addressing CVE-2024-37568, where OpenSSH keys and certificates were incorrectly accepted as HMAC secrets. This vulnerability allowed any party knowing the public key to forge HS256 tokens by signing with arbitrary claims. Applications using `jwt.decode` or `JsonWebSignature` without algorithm restrictions are affected. Patched in version 1.9.5, a workaround involves restricting algorithms or using typed keys instead of raw bytes. |
| 2026-11-15 NEW 2026 | CAP JWT claims validation bypass using non-canonical claim names intermediate 2 min read AuthN | Library providing HashiCorp's cap JWT validation, affected by CVE-2026-19194, which allows bypasses via non-canonical claim names. This improper handling of case sensitivity can lead to authorization decisions based on unvalidated claims, potentially impacting downstream applications trusting attacker-controlled JWTs. The vulnerability is fixed in cap version 0.14.0. → ibm.com |
| 2026-11-15 NEW 2026 | JWT Pitfalls: What Goes Wrong and How to Avoid It beginner AuthN | This content discusses common pitfalls in JSON Web Token (JWT) implementation, highlighting eight mistakes frequently warned about by JWT specifications and OWASP. It explains how each of these errors compromises security. The piece also outlines the precise verification checks that a JWT verifier should perform to prevent these vulnerabilities. |
| 2026-11-15 NEW 2026 | SUSE-SU-2026:5064-1: PyJWT HMAC forgery and JWKS key-substitution fixes news 4 min read AuthN Python | Update for python-PyJWT addresses multiple vulnerabilities including CVE-2026-101917, which could amplify outbound requests to JWKS endpoints, and CVE-2026-102268 and CVE-2026-102271, allowing HMAC token forgery. It also fixes issues related to disclosed credentials, substituted verification keys, raw-token revocation bypass, denial-of-service via CPU consumption, and the misuse of sender-constrained tokens. |
| 2026-11-14 NEW 2026 | A Valid Signature Isn’t Enough: Attributing and Validating Leaked JWTs intermediate 10 min read AuthN | Library for detecting and validating leaked JSON Web Tokens (JWTs). This resource details how signature checks alone are insufficient, covering only a fraction of leaked tokens and failing to identify the issuing service or token validity. It provides a step-by-step guide using tools like `curl`, `jq`, `openssl`, and Python to manually validate an OIDC JWT, demonstrating how to decode, check claims, fetch OIDC configurations, download JWKS, select the appropriate signing key, and rebuild the public key for signature verification. → blog.gitguardian.com |
| 2026-11-14 NEW 2026 | JWT Auth WordPress plugin does not invalidate refresh tokens on password reset (CVE-2026-106466) news AuthN | The JWT Auth WordPress plugin, versions up to 3.0.2, has a vulnerability (CVE-2026-106466) where it fails to invalidate refresh tokens after a user password reset. This means an attacker who previously obtained a user's refresh token could still use it to authenticate as that user even after their password has been changed, posing a significant security risk. |
| 2026-11-14 NEW 2026 | HashiCorp cap JWT validation library claims validation flaw news AuthN | HashiCorp's JWT validation library has a flaw where it may not correctly validate claims. This vulnerability, present in versions before 0.x, allows for the possibility of incorrect claim validation. Researchers discovered this issue, and HashiCorp has since released a patched version to address the security concern. |
| 2026-11-14 NEW 2026 | USN-9059-1: ruby-jwt HMAC verification with empty/missing key allows token forgery news AuthN | Library update addressing USN-9059-1 for ruby-jwt, which incorrectly verified HMAC signatures when the verification key was empty or missing. This vulnerability, allowing remote attackers to forge tokens and bypass authentication, is corrected by updating to newer package versions. |
| 2026-11-14 NEW 2026 | joserfc: list-valued jti accepted by exact-value JWT claim validation news 2 min read Python | Library patch addresses a vulnerability in `joserfc` versions prior to 1.7.6 where the JWT `jti` claim validation incorrectly accepted array-valued `jti` claims that contained an expected string value. This allowed an attacker to bypass exact-value checks by submitting a list-valued `jti` instead of a single string, potentially impacting applications relying on precise `jti` matching as described in RFC 7519. The fix, released in commit e93fd2b, enforces the string type requirement for `jti` claims. |
| 2026-11-14 NEW 2026 | Arize Phoenix: format string injection in applyChatTemplate GraphQL query leaks secrets / JWT signing key news 2 min read AI GraphQL Python Secrets | Writeup on GHSA-gfv3-m769-5xm3, a format string injection vulnerability in Arize Phoenix's `applyChatTemplate` GraphQL endpoint, allows attackers to read sensitive server-side environment variables, including JWT signing keys. Exploitation is possible with unauthenticated access or any user account on authenticated deployments, leading to the potential forging of admin session tokens and decryption of stored secrets. Affected versions range from v13.0.0 to v14.8.0. Recommended fixes include restricting attribute traversal, adding authentication, and limiting F_STRING format usage. |
| 2026-11-13 2026 | Keycloak authentication bypass via JWT algorithm confusion (CVE-2026-11800) news AuthN | Writeup of CVE-2026-11800, a JWT algorithm confusion vulnerability in Keycloak. This flaw, present in the JWT Authorization Grant flow, allows an attacker with valid client credentials to bypass signature verification. By forging assertions, attackers can create unauthorized access tokens, impersonate federated users, and achieve unauthorized access or privilege escalation. |
| 2026-11-13 2026 | JWT signing key in a JavaScript bundle: case study intermediate 1 min read Secrets | Library for verifying JWT authentication bypass vulnerabilities. This case study demonstrates how a hardcoded fallback HS256 signing key in a JavaScript bundle allowed an unauthenticated caller to mint forged session cookies, leading to authentication bypass and cross-user writes on a theme API. Scanners may miss this vulnerability due to the short fallback key being mistaken for leftover development code. |
| 2026-11-13 2026 | Account takeover in @better-auth/expo via a signing oracle intermediate 4 min read AuthN Mobile | Library that enables account takeover in `@better-auth/expo` due to a signing oracle vulnerability. An unauthenticated attacker can exploit the `/expo-authorization-proxy` endpoint to forge tokens, facilitating email changes and session hijacking without user interaction. This issue impacts multiple versions and was addressed in the November 3 security release. |
| 2026-11-13 2026 | Simple JWT Login WordPress plugin CSRF intermediate CSRF | A Cross-Site Request Forgery (CSRF) vulnerability has been discovered in the "Simple JWT Login" WordPress plugin. This flaw allows an attacker to trick a logged-in administrator into performing actions on their behalf without their knowledge or consent. Exploiting this could lead to unauthorized changes or malicious activities within the WordPress site. Users of the plugin are advised to update to the latest version to mitigate this security risk. |
| 2026-11-13 2026 | PyJWT HMAC forgery with known public key (CVE-2026-102268) security update news 2 min read Python | Update for python-PyJWT addresses CVE-2026-102268, a critical HMAC forgery vulnerability where an attacker knowing the public key can forge authenticated tokens, and CVE-2026-102270, a denial-of-service vulnerability causing intensive CPU consumption. This security update is available for various SUSE Linux Enterprise products. |
| 2026-11-12 2026 | JWT vulnerabilities: how weak token validation still slips through in 2026 intermediate 4 min read AuthN | Writeup detailing common JWT vulnerability patterns, including unsigned tokens, algorithm confusion, weak secrets, and missing claim checks, and a methodical testing approach. It emphasizes verifying signatures, claims, keys, and token lifecycle, while ruling out decoding and logout false positives, offering configuration fixes like centralized validation and secure key management. |
| 2026-11-12 2026 | Multiple vulnerabilities in lua-resty-jwt news 3 min read | Bulletin detailing seven vulnerabilities in lua-resty-jwt, including CWE-20 improper input validation enabling token revocation bypass, CWE-287 improper authentication allowing forged tokens via public key PEM text, CWE-347 improper signature verification enabling arbitrary JWT forging with algorithm confusion, CWE-400 resource exhaustion from unbounded PBKDF2 iterations, CWE-203 observable discrepancy for JWE plaintext recovery, CWE-476 NULL pointer dereference causing DoS via ECDSA verification, and CWE-354 improper integrity check enabling forged encrypted tokens. |
| 2026-11-12 2026 | fast-jwt incomplete patch re-enables RSA to HS256 algorithm confusion (CVE-2026-107722) intermediate 1 min read AuthN | Writeup detailing CVE-2026-107722, an incomplete patch in fast-jwt that re-enables an RSA to HS256 algorithm confusion vulnerability. The fix for CVE-2026-34950 incorrectly assumed `String.prototype.trim()` would prevent bypasses; leading non-whitespace characters still allow an attacker to use a public RSA key as an HMAC shared secret. This attack requires knowledge of the target's public RSA key and a source for that key which can be manipulated with a non-whitespace prefix. Verified on fast-jwt@6.2.2. → advisories.gitlab.com |
| 2026-11-12 2026 | libjwt algorithm confusion: JWT forgery with RSA JWK as empty-key HMAC intermediate 3 min read AuthN | Library vulnerability GHSA-q843-6q5f-w55g in libjwt allows JWT forgery by accepting an RSA JWK without an `alg` parameter as an empty-key HMAC verification key. This authentication bypass, affecting applications that dynamically select verification algorithms from JWT headers, enables unauthenticated attackers to forge claims, leading to potential authentication bypass and privilege escalation. The issue stems from libjwt incorrectly allowing HMAC verification with an RSA key, as the `libjwt/jwt-common.c` `__setkey_check()` function permits any non-`NONE` algorithm when the JWK `alg` is `NONE`. |
| 2026-11-12 2026 | JWT verification bugs: pin the algorithm, then prove the fix intermediate 9 min read AuthN Python | Reference detailing JWT verification vulnerabilities, focusing on common mistakes like allowing tokens to dictate algorithms or neglecting signature validation. It provides guidance on configuring libraries such as PyJWT, jsonwebtoken, and jose to enforce security rules, emphasizing the importance of pinning algorithms, properly handling keys, and verifying claims like `iss` and `aud`. The entry highlights how these misconfigurations can lead to vulnerabilities such as algorithm confusion and forged token acceptance, and stresses the need for concrete test suites to prove the effectiveness of implemented fixes. |
| 2026-11-11 2026 | HipaLab JWT Inspector: The JWT Tool I Wish I Had Years Ago beginner | The HipaLab JWT Inspector is a valuable tool for developers working with APIs, identity platforms, authentication flows, and modern web applications. It simplifies the process of inspecting and debugging JSON Web Tokens (JWTs), which are crucial for secure communication and authentication in these environments. The tool aims to streamline common JWT-related tasks, making it easier for developers to understand and manage token data. |
| 2026-11-11 2026 | JWTs Don’t Log Users Out by Magic beginner AuthN | The article explains that simply deleting a JWT (JSON Web Token) from a user's browser doesn't instantly log them out. While it might feel like it, the server retains the token's validity for its set expiration period. This means the token can still be used for authentication on the server side even after being removed from the client. True logout functionality requires server-side revocation mechanisms to invalidate the token immediately, rather than relying solely on client-side deletion. |
| 2026-11-11 2026 | A Signing Key That Changes on Every Restart Logs Everyone Out beginner | In an early version of a codebase, a critical flaw caused users to be logged out upon every application restart. This was due to the JSON Web Token (JWT) signing key being generated using `os.urandom(32)` each time the process started. Consequently, every restart resulted in a new, different signing key, invalidating all existing sessions and forcing users to re-authenticate. |
| 2026-11-11 2026 | Bug bounty tip: exploiting JWT kid header injection for auth bypass intermediate 1 min read AuthN Bug Bounty | Writeup detailing JWT kid header injection vulnerabilities. Exploiting insecure key retrieval mechanisms allows for authentication bypasses. Techniques include path traversal to `/dev/null` for null key verification, SQL injection via UNION SELECT in database queries, and command injection through unsanitized shell execution or SSRF for remote key fetching. These flaws enable arbitrary token forging, leading to administrative account compromise. |
| 2026-11-11 2026 | @neo4j/graphql: only the first condition of a multi-condition @authentication JWT filter is evaluated news AuthN AuthZ GraphQL | Library advisory for @neo4j/graphql detailing GHSA-58qp-3mmm-5vh8, where multi-condition JWT filters within @authentication rules fail to evaluate subsequent conditions beyond the first. This vulnerability allows attackers to bypass access controls, such as role restrictions, by crafting JWTs that satisfy only the initial filter criterion. Upgrade to version 7.6.7 or utilize explicit AND arrays or inline operator syntax as workarounds. |
| 2026-11-10 2026 | A JWT the server never verified (XBEN-027) intermediate 4 min read AuthN | Library for bypassing JSON Web Token (JWT) signature verification, demonstrated in XBEN-027. This vulnerability allows an attacker to modify claims within a JWT, such as the user ID, and gain unauthorized access to other user accounts by exploiting the server's failure to validate the token's signature or accept unsigned tokens. The bypass occurs when the server trusts claims without verifying the signature or using explicit algorithms and keys. |
| 2026-11-10 2026 | The JWT algorithm that verified nothing (alg:none) intermediate 4 min read AuthN | Library issue detailing the `alg:none` JWT vulnerability, where libraries implicitly trusted the algorithm specified in the JWT header, leading to token forgery. This allowed attackers to bypass signature verification by setting the algorithm to `none` and leaving the signature empty. Vulnerable libraries, including `node-jsonwebtoken` (CVE-2015-9235), initially failed to validate the algorithm against the provided key. RFC 8725 later mandated that libraries must allow callers to specify supported algorithms, preventing this class of attack. |
| 2026-11-10 2026 | Off the Curve: JWT forgery CTF writeup intermediate 3 min read | Writeup of the "Off the Curve" CTF challenge, detailing a four-stage crypto chain to decrypt a report. The attack begins with forging an admin JWT by exploiting an empty HMAC key via `kid=/`, then recovering ECDH receipts leaked by an admin panel. An invalid-curve attack on these receipts allows for the reconstruction of a 32-bit EC service scalar. Finally, this scalar is used to rebuild the report's KDF, decrypting the report and revealing the flag. |
| 2026-11-10 2026 | JWT authentication bypass via flawed signature verification intermediate 1 min read AuthN Burp | Writeup detailing a JWT authentication bypass on the PortSwigger platform by exploiting a flawed signature verification mechanism. The bypass is achieved by manipulating the `alg` parameter in the JWT header to `none`, effectively informing the server that the token is unsigned and requires no verification. The article demonstrates manual token crafting and highlights the utility of the Burp JWT Editor extension for automating this `alg: none` attack to gain administrator privileges by changing the `sub` claim. |
| 2026-11-10 2026 | Neo4j GraphQL CVE-2026-92683: JWT filter bypass news 2 min read API Sec AuthZ GraphQL | Library writeup detailing CVE-2026-92683 affecting Neo4j's @neo4j/graphql library, versions 7.0.0 through 7.6.6. This high-severity (CVSS 8.6) vulnerability allows attackers with a valid JSON Web Token to bypass all but the first filter condition when using multi-condition JWT filters with the @authentication directive, leading to improper authorization. |
| 2026-11-09 2026 | CVE-2026-114615: Authlib JWT algorithm confusion fix bypass intermediate 8 min read AuthN Python | Writeup on CVE-2026-114615 details an incomplete fix in Authlib versions 1.3.1 through 1.8.0 that allowed JWT algorithm confusion bypass. This vulnerability, stemming from how PEM keys were processed, enabled attackers to forge tokens by using public keys as HMAC secrets. The issue was exploited by prepending characters like newlines or spaces to PEM-encoded keys, circumventing Authlib's initial security checks. The vulnerability, GHSA-7vr2-2fgp-9w7p, affects applications using Authlib's `jwt.decode()` function with mixed symmetric and asymmetric algorithms. The fix was implemented in Authlib 1.9.0. |
| 2026-11-09 2026 | joserfc OctKey accepts DER RSA public keys as HMAC secrets (HS256 forgery) intermediate 3 min read AuthN Python | Library vulnerability GHSA-vvgp-wfq3-pjxj in joserfc allows for HS256 token forgery by accepting DER-encoded RSA public keys as HMAC secrets. An attacker possessing the service's public key can import it as an octet key, enabling them to forge tokens that the service will then successfully verify. This issue is similar to CVE-2026-85394 in python-jose and a previously reported authlib empty-HMAC key vulnerability. The fix, committed in version 1.7.6, rejects asymmetric public keys during oct key imports. |
| 2026-11-09 2026 | 10 JWT Mistakes That Turn a Login Token Into a Security Hole, Each One Reproduced beginner AuthN | This article highlights ten common mistakes in handling JSON Web Tokens (JWTs) that can create security vulnerabilities. The core issue is that JWT security relies entirely on how the token is verified by the application. The content details various flaws, such as missing signatures or tokens that remain valid even after intended invalidation, turning a login token into a security risk. The article aims to reproduce each of these exploitable errors. |
| 2026-11-09 2026 | JWT Authentication Explained in Depth: Public Keys, Private Keys, HS256 vs RS256, OAuth 2.0, beginner AuthN | This article by Pavan Pithdiya delves deeply into JWT (JSON Web Token) authentication. It explains the fundamental concepts of public and private keys in securing tokens. The post contrasts two common signing algorithms, HS256 and RS256, highlighting their differences in security and implementation. Additionally, it explores the integration of JWT with OAuth 2.0, a widely adopted authorization framework, providing a comprehensive understanding of how these technologies work together for secure authentication and authorization in modern applications. |
| 2026-11-09 2026 | Hammer (TryHackMe): From a 4-Digit Lottery to RCE via JWT kid Abuse intermediate RCE | This walkthrough details the process of compromising the "Hammer" room on TryHackMe. The user describes navigating the box, starting with a low-privilege vulnerability related to a four-digit lottery, and ultimately achieving Remote Code Execution (RCE). The key exploitation technique involved abusing JWT `kid` values. The content focuses on the thought process and challenges faced during the machine's penetration without relying on existing write-ups. |
| 2026-11-08 2026 | JWT vulnerabilities: algorithm confusion, alg none and fixes intermediate 20 min read AuthN | Reference summarizing JWT vulnerabilities including algorithm confusion and "alg: none," detailing attacks like switching RS256 to HS256 and injecting attacker-supplied JWKs. It emphasizes validation checks based on RFC 8725, such as pinning algorithms and keys server-side, rejecting unsigned tokens, and verifying issuer and audience claims. The entry notes these flaws are present in products like WSO2, pac4j, and Apache CXF, and provides practical guidance for code reviews and library configurations for libraries such as jose, PyJWT, Nimbus, and Spring. |
| 2026-11-08 2026 | python-jose authentication bypass through 3.5.0 intermediate AuthN Python | Library vulnerability in python-jose through 3.5.0 allows authentication bypass by forging JWTs. This occurs when HMACKey and CryptographyHMACKey accept zero-length HMAC secrets, enabling attackers to craft tokens with arbitrary claims that `jwt.decode` will accept, as seen in CVE-2026-120459 and detailed by vulncheck. |
| 2026-11-08 2026 | Keycloak authentication bypass via JWT algorithm confusion (CVE-2026-11800) news AuthN | A critical authentication bypass vulnerability (CVE-2026-11800) has been discovered in Keycloak. This flaw, specifically within the JWT Authorization Grant flow, allows an attacker possessing valid client credentials to circumvent signature verification. The issue stems from a confusion in how JWT algorithms are handled. This bypass could potentially compromise the security of applications relying on Keycloak for authentication. |
Frequently Asked Questions
- What is JWT algorithm confusion?
- Algorithm confusion (also called key confusion) exploits servers that accept multiple JWT signing algorithms. The classic example: a server expects an RS256 (asymmetric) signature but accepts HS256 (symmetric). An attacker switches the alg header to HS256 and signs the token using the server's RSA public key as the HMAC secret — turning a verification key into a signing key.
- What is the JWT "none" algorithm vulnerability?
- The JWT specification allows an alg value of "none", meaning the token is unsigned. Some libraries historically accepted this even for tokens that should have been verified, letting an attacker forge any payload. Modern libraries reject "none" by default, but the bug periodically resurfaces in custom implementations and lesser-used languages.
- Should I store JWTs in localStorage or cookies?
- Both have tradeoffs. localStorage is vulnerable to XSS — any script on the page can read the token. Cookies with HttpOnly, Secure, and SameSite=Strict prevent XSS theft but introduce CSRF risk if not handled. For most applications, HttpOnly cookies with proper CSRF defenses are the safer choice. Refresh-token rotation and short JWT lifetimes reduce the impact either way.
Weekly AppSec Digest
Get new resources delivered every Monday.