# CVE-2026-25537: jsonwebtoken has Type Confusion that leads to potential authorization bypass

> Attackers can bypass time-based validation checks by providing malformed claims, leading to potential authentication and authorization bypasses in applications using this Rust library.

- **Severity:** Medium 5.5 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:P`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 4 Feb 2026
- **Updated:** 5 Feb 2026
- **Also known as:** DEBIAN-CVE-2026-25537, GHSA-h395-gr6q-cpjc, MINI-38hc-f2v8-hmc9, MINI-8f84-f7h5-3vmc, MINI-g969-x52j-vcq4, UBUNTU-CVE-2026-25537

## What is CVE-2026-25537?

CVE-2026-25537 is a medium-severity authentication bypass vulnerability in Keats jsonwebtoken, published on 4 Feb 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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.

Weakness: CWE-843 (Access of Resource Using Incompatible Type)

## Which versions are affected by CVE-2026-25537?

2 open source packages ship an affected version, including jsonwebtoken. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `jsonwebtoken` | crates.io | All versions | 10.3.0 |
| `jsonwebtoken` | crates.io | All versions | 10.3.0 |

Products: Keats Jsonwebtoken.

## How do I fix CVE-2026-25537?

Upgrade jsonwebtoken to 10.3.0 or later.

## Is CVE-2026-25537 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-25537 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-25537 and fix it if it is affected.

What it is: CVE-2026-25537 is a medium-severity authentication bypass vulnerability in Keats jsonwebtoken, published on 4 Feb 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-25537 exists.

Affected packages and fixed versions:
- jsonwebtoken (crates.io): affected all versions; fixed in 10.3.0
- jsonwebtoken (crates.io): affected all versions; fixed in 10.3.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-25537/ (Markdown: https://insights.sbomify.com/CVE-2026-25537/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-25537
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-25537
- OSV: https://osv.dev/vulnerability/CVE-2026-25537

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-25537/
Summaries are generated and may contain mistakes; the official description above is the record.
