HIGHCVSS v3.1 7.5Vulnerability

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 trap. Because this occurs while parsing the JWT header, the application crashes before signature verification. Affected code: * Sources/JWTKit/JWTKeyCollection.swift (verify() - parseHeader()) * Sources/JWTKit/JWTParser.swift (parseHeader()) * Sources/JWTKit/JWTHeaderField.swift (JWTHeaderField.init(from:) unchecked Double - Int conversion) ### PoC The following code reproduces the issue through the public JWT verification API: ``` import JWTKit let keys = JWTKeyCollection() let token = """ eyJhbGciOiJIUzI1NiIsIngiOjFlMzAwfQ.eyJzdWIiOiIxMjMifQ.invalid """ do { struct Payload: JWTPayload { let sub: String func verify(using algorithm: some JWTAlgorithm) async throws {} } _ = try await keys.verify(token, as: Payload.self) pr

Properties

Severity
high
Summary
JWTKit: Unauthenticated denial of service when parsing malicious JWT headers
Nvd fetched at
2026-12-04T15:00:48.841578+00:00
Epss score
0.01187
Cvss severity
HIGH
Cvss score
7.5
Retrieved at
2026-12-04T15:02:58+00:00
Ghsa published
2026-12-02T22:08:55Z
Source url
https://github.com/advisories/GHSA-hfm2-66rr-3mcf
Ghsa updated
2026-12-02T22:08:56Z
Ghsa id
GHSA-hfm2-66rr-3mcf
Last source
FIRST EPSS
Score
7.5
Cvss version
3.1
Cve id
CVE-2026-142550
Cvss vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
First seen by Signal
2026-12-02T22:45:38+00:00
Name
CVE-2026-142550
Is ghsa only
false
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Related Entities (3)

AFFECTS (1)

HAS_WEAKNESS (1)

VULNERABLE_TO (1)

Related research

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-142550 (CVSS v3.1 7.5) — Ninja Signal Threat Intelligence | Ninja Signal