cvelo
P2 · HighCVSS 7.5EPSS 1.2%

JWTKit: Unauthenticated denial of service when parsing malicious JWT headers

  • CVE-2026-142550
  • GHSA-hfm2-66rr-3mcf
  • EUVD-2026-141869

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.

Text from the CVE.org record.

Recommendation

No source states a fixed version. Check the vendor advisory.

Affected

  • vapor jwt-kit

    Affected versionsFixed in
    < 5.8.0none stated
  • github.com/vapor/jwt-kitSwiftURL

    Affected versionsFixed in
    up to 5.7.1none stated

Product versions from the CVE.org record.

Timeline

  1. Published

Related news

No article from the followed outlets names this vulnerability.