CVE-2024-25189
Critical · 9.8CVSS
9.8
EPSS
1.0%
Published
Feb 8, 2024
CISA due date
—
Cloudanix analysis
A common library used to check digital login tokens has a flaw that lets attackers guess valid tokens by watching how long the server takes to answer, potentially letting them break into systems without passwords.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Full Compromise
- Component
- Library
- Class
- Authentication Bypass
- Remediation
- Upgrade
- Effort
- Low
- Patch risk
- Low
What it actually does
The library performs JWT signature or claim verification using non-constant-time strcmp, allowing remote attackers to measure response-time differences and progressively guess valid authentication tokens byte-by-byte over the network.
Why it matters to the business
Attackers can obtain unauthorized access to any system relying on this library for authentication, resulting in data exposure, privilege escalation, and service compromise without requiring credentials or user interaction.
How an attack unfolds
An attacker repeatedly submits modified JWT tokens to an endpoint protected by libjwt, records the server response latency for each guess, and uses the timing differential from strcmp to brute-force a valid token; once obtained, the token grants full authenticated access. Public exploit code is available and the vulnerability has remained unpatched for years.
How to fix it
Replace libjwt with a maintained fork or alternative library that uses constant-time comparison functions (e.g., CRYPTO_memcmp or sodium_memcmp) for all authentication checks; monitor the upstream project for a future release containing the fix and rebuild all dependent applications.
How to confirm the fix worked
Review source code or binary for calls to strcmp (or equivalent) inside JWT verification paths; perform timing analysis tests against authentication endpoints before and after the change to confirm constant-time behavior.
Typical attack path
- Identify an endpoint that accepts JWTs validated by the vulnerable libjwt library
- Craft token variations that differ by single bytes in the signature or claims section
- Measure and compare server response times across many requests to recover the correct token
- Replay the recovered valid token to access protected resources or APIs
How to detect it
Search authentication and application logs for high volumes of requests to JWT-protected endpoints from single sources with systematically varying token values; correlate with unusual timing patterns or spikes in failed verification attempts.
What your security team should do
- Treat as high-priority because public exploit code exists and the flaw has been known since 2024 without a listed fix
- Inventory all builds and containers that statically or dynamically link the bencollins jwt c library
- Replace the library or implement a local patch using constant-time comparison immediately
- Add runtime detection for anomalous authentication request patterns while the fix is deployed
The record
libjwt 1.15.3 uses strcmp (which is not constant time) to verify authentication, which makes it easier to bypass authentication via a timing side channel.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:10 | libjwt | 0 | 1.10.1-1+deb10u1 |
| Debian:11 | libjwt | 0 | 1.10.2-1+deb11u1 |
| Debian:12 | libjwt | 0 | 1.10.2-1+deb12u1 |
| Debian:13 | libjwt | 0 | 1.17.0-2 |
| Ubuntu:18.04:LTS | libjwt | 0 | No fix |
| Ubuntu:20.04:LTS | libjwt | 0 | No fix |
| Ubuntu:22.04:LTS | libjwt | 0 | No fix |
| Ubuntu:24.04:LTS | libjwt | 0 | No fix |
| Ubuntu:24.10 | libjwt | 0 | No fix |
| Ubuntu:25.04 | libjwt | 0 | No fix |
| Ubuntu:25.10 | libjwt | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | libjwt | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | libjwt | 0 | No fix |
Related vulnerabilities
- CVE-2026-88834 A flaw was found in BusyBox's httpd web server. CWE-203
- CVE-2026-87620 Observable discrepancy in SVG in Google Chrome prior to 153.0.8010.36 allowed a remote… CWE-203
- CVE-2026-87623 Observable discrepancy in DOM in Google Chrome prior to 153.0.8010.36 allowed a remote… CWE-203
- CVE-2026-87619 Observable discrepancy in Prefetch in Google Chrome prior to 153.0.8010.36 allowed a… CWE-203
- CVE-2026-87566 Observable discrepancy in Layout in Google Chrome prior to 153.0.8010.36 allowed a remote… CWE-203
- CVE-2026-87539 Observable discrepancy in Network in Google Chrome prior to 153.0.8010.36 allowed a… CWE-203
- CVE-2026-87516 Observable discrepancy in Navigation in Google Chrome prior to 153.0.8010.36 allowed a… CWE-203
- CVE-2026-87518 Observable discrepancy in Safebrowsing in Google Chrome on on iOS prior to 153.0.8010.36… CWE-203