JWTKit: Unauthenticated denial of service when parsing malicious JWT headers
CVE-2026-142550
Summary JWTKit can crash while parsing a JWT header containing an extremely large integer value. When decoding header fields, the library parses JSON numbers as Double and converts integral values to Int without checking whether the value fits into the valid Int range. A header containing a value such as 1e300 causes a Swift runtime trap. Because JWT headers are parsed before signature verification, an attacker can crash the application by sending a specially crafted JWT without requiring a valid signature. Details JWTKeyCollection.verify() parses the JWT header before selecting a signer and verifying the token signature. The header is decoded by JWTParser.parseHeader(), which deserializes the JSON into JWTHeader. During this process, JWTHeaderField.init(from:) decodes JSON numbers as Double and converts integral values to Int without validating that they fit within the representable Int range: let doubleValue = try container.decode(Double.self) if doubleValue.truncatingRemainder(dividingBy: 1) == 0 { self = .int(Int(doubleValue)) } An attacker can supply an extremely large integral value (for example, 1e300), causing the Int(doubleValue) conversion to trigger a Swift runtime…
Assessment
- CVSS
- 7.5 (v3.1)
- Severity
- High
- EPSS
- 0% chance of exploitation in the next 30 days
- Known exploited
- Not listed in CISA KEV
- Exploit availability
- Nothing found in Exploit-DB, Metasploit, Nuclei or public PoC repositories
- Published
- 2 December 2026
- Last updated
- 2 December 2026
- Affected
- vapor · jwt-kit · github.com/vapor/jwt-kit
- Weakness
- CWE-681
- Assigner
- security-advisories@github.com
CVSS vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
At the source
References
- https://github.com/vapor/jwt-kit/security/advisories/GHSA-hfm2-66rr-3mcf
- https://nvd.nist.gov/vuln/detail/CVE-2026-142550
- https://github.com/vapor/jwt-kit/commit/a87b6f52efa0bf47f4925d52380e4f2d8346c003
- https://github.com/vapor/jwt-kit/releases/tag/5.8.0
- https://github.com/advisories/GHSA-hfm2-66rr-3mcf
Community proofs of concept
No community proof of concept yet. If you have one for a published vulnerability and the right to share it, add it below — it will appear here once reviewed.
Submit a proof of concept
Only for publicly disclosed vulnerabilities, and only material from testing you were authorised to perform. This platform does not buy, sell, or broker exploits — see earning from vulnerability research for legitimate bounty programs. Submissions are reviewed before they appear. Text only; do not include live credentials, personal data, or anything targeting systems you are not permitted to test.
Query this programmatically
Agents can read this through the MCP endpoint, or over HTTP:
curl https://cve.zerocrew.in/api/cve/CVE-2026-142550