CVE-2026-25537
Unknown Unknown - Not Provided
Type Confusion in jsonwebtoken Rust Library Enables Auth Bypass

Publication date: 2026-02-04

Last updated on: 2026-02-11

Assigner: GitHub, Inc.

Description
jsonwebtoken is a JWT lib in rust. Prior to version 10.3.0, there is a Type Confusion vulnerability in jsonwebtoken, specifically, in its claim validation logic. When a standard claim (such as nbf or exp) is provided with an incorrect JSON type (Like a String instead of a Number), the library’s internal parsing mechanism marks the claim as β€œFailedToParse”. Crucially, the validation logic treats this β€œFailedToParse” state identically to β€œNotPresent”. This means that if a check is enabled (like: validate_nbf = true), but the claim is not explicitly marked as required in required_spec_claims, the library will skip the validation check entirely for the malformed claim, treating it as if it were not there. This allows attackers to bypass critical time-based security restrictions (like β€œNot Before” checks) and commit potential authentication and authorization bypasses. This issue has been patched in version 10.3.0.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-02-04
Last Modified
2026-02-11
Generated
2026-05-07
AI Q&A
2026-02-05
EPSS Evaluated
2026-05-05
NVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
keats jsonwebtoken to 10.3.0 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
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.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart