CVE-2026-25537
Type Confusion in jsonwebtoken Rust Library Enables Auth Bypass
Publication date: 2026-02-04
Last updated on: 2026-02-11
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| keats | jsonwebtoken | to 10.3.0 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-843 | The product allocates or initializes a resource such as a pointer, object, or variable using one type, but it later accesses that resource using a type that is incompatible with the original type. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
The vulnerability exists in the jsonwebtoken library (a JWT library in Rust) prior to version 10.3.0. It is a Type Confusion issue in the claim validation logic. When a standard claim like 'nbf' (Not Before) or 'exp' (Expiration) is provided with an incorrect JSON type (for example, a String instead of a Number), the library marks the claim as "FailedToParse."
The problem is that the validation logic treats this "FailedToParse" state the same as if the claim was "NotPresent." Therefore, if a validation check is enabled (such as validate_nbf = true) but the claim is not explicitly required, the library skips the validation check for the malformed claim, effectively ignoring it.
This allows attackers to bypass important time-based security restrictions, such as "Not Before" checks, potentially leading to authentication and authorization bypasses. The issue was fixed in version 10.3.0 of the library.
How can this vulnerability impact me? :
This vulnerability can allow attackers to bypass critical time-based security checks in JWT tokens, such as the "Not Before" (nbf) or expiration (exp) claims.
By exploiting this, attackers may authenticate or authorize themselves improperly, gaining access to resources or actions they should not have permission for.
This can lead to unauthorized access, potentially compromising the security of applications relying on the jsonwebtoken library for JWT validation.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
I don't know
How can this vulnerability be detected on my network or system? Can you suggest some commands?
I don't know
What immediate steps should I take to mitigate this vulnerability?
To mitigate this vulnerability, you should upgrade the jsonwebtoken library to version 10.3.0 or later, where the issue has been patched.