JWTKit: Unauthenticated denial of service when parsing malicious JWT headers
Summary
| CVE | CVE-2026-142550 |
|---|---|
| State | PUBLISHED |
| Assigner | GitHub_M |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-12-02 21:18:16 UTC |
| Updated | 2026-12-02 21:18:16 UTC |
| Description | JWTKit is a Swift library for signing and verifying JSON Web Tokens. Prior to 5.8.0, JWTKeyCollection.verify() in Sources/JWTKit/JWTKeyCollection.swift parses the JWT header using JWTParser.parseHeader() in Sources/JWTKit/JWTParser.swift before selecting a signer and verifying the signature. During parsing, JWTHeaderField.init(from:) in Sources/JWTKit/JWTHeaderField.swift decodes JSON numbers as Double and converts integral values to Int without checking the representable range. A remote unauthenticated attacker can provide an extremely large integral header value that triggers a Swift runtime trap and crashes the application without a valid signature or knowledge of the signing key. This issue is fixed in version 5.8.0. |
Risk And Classification
Primary CVSS: v3.1 7.5 HIGH from [email protected]
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Problem Types: CWE-681 | CWE-681 CWE-681: Incorrect Conversion between Numeric Types
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | [email protected] | Secondary | 7.5 | HIGH | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| 3.1 | CNA | DECLARED | 7.5 | HIGH | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
CVSS v3.1 Breakdown
Attack Vector
NetworkAttack Complexity
LowPrivileges Required
NoneUser Interaction
NoneScope
UnchangedConfidentiality
NoneIntegrity
NoneAvailability
HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Vendor Declared Affected Products
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| github.com/vapor/jwt-kit/commit/a87b6f52efa0bf47f4925d52380e4f2d8346c003 | [email protected] | github.com | |
| github.com/vapor/jwt-kit/security/advisories/GHSA-hfm2-66rr-3mcf | [email protected] | github.com | |
| github.com/vapor/jwt-kit/releases/tag/5.8.0 | [email protected] | github.com | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
No vendor comments have been submitted for this CVE.
There are currently no legacy QID mappings associated with this CVE.