Home › Vulnerabilities › vapor
JWTKit flaws include a missing audience check and a crash; all three fixed in 5.8.0
Three vulnerabilities published on 2026-12-02 affect the Swift JWTKit library for signing and verifying JSON Web Tokens. The most severe is a missing audience check on Apple, Google and Microsoft identity tokens that can allow cross-client token reuse, and all three are fixed in version 5.8.0.
What to look into
- 3 vulnerabilities in vapor jwt-kit: 2 high, 1 medium (CVSS up to 8.1).
- None of them is known to be exploited yet.
- Start with CVE-2026-142551 (8.1 high): JWTKit is a Swift library for signing and verifying JSON Web Tokens. From 4.0.0 until 5.8.0, JWTSigner.verify() in Sources/JWTKit/JWTSigner.swift invokes payload verification after validating the JWS… An attacker without an account can exploit this over the network if a user is tricked into an action.
- 2 of 3 can be attacked over the network without logging in, 1 of them without anyone clicking anything.
- Kinds of flaws: Insufficient Verification of Data Authenticity (×2); Improper Authentication; Incorrect Conversion between Numeric Types.
Key points
- CVE-2026-142551 (HIGH, CVSS 8.1) is the most severe: a missing aud check on Apple, Google and Microsoft identity tokens, affecting 4.0.0 through 5.8.0.
- CVE-2026-142550 (HIGH, CVSS 7.5) lets an unauthenticated remote attacker crash an application with an oversized integral header value.
- CVE-2026-142549 (MEDIUM, CVSS 4.9) lets someone holding an expired trusted certificate's private key backdate validation time.
- All three records name version 5.8.0 as the fix.
- None of the records states that exploitation has been observed.
Overview
NVD published three vulnerabilities on 2026-12-02 for JWTKit, a Swift library for signing and verifying JSON Web Tokens. The flaws fall into three groups: a missing audience check, an input-handling crash, and a trust problem in certificate validation time. Each record says the fix is in version 5.8.0.
Highest-severity issue: missing audience check
CVE-2026-142551 (HIGH, CVSS 8.1) affects releases from 4.0.0 until 5.8.0. According to the record, the Apple, Google and Microsoft identity token types do not check the aud claim against the application's intended audience, even though signature verification runs first. A legitimate provider-issued token obtained for another client can therefore be accepted by an application that relies only on the built-in verification. The record says this can enable authentication bypass or account takeover, depending on the application's identity mapping. Applications that check the intended audience themselves are described as not affected.
Crash on a crafted header
CVE-2026-142550 (HIGH, CVSS 7.5) affects versions before 5.8.0. Header parsing converts JSON numbers to integers without checking their range, and this happens before the signature is verified. The record says an unauthenticated remote attacker can send an extremely large integral header value and crash the application, without a valid signature or the signing key.
Certificate validation time
CVE-2026-142549 (MEDIUM, CVSS 4.9) also affects versions before 5.8.0. The X.509 verifier reads a signed-date value from the unverified token payload and uses it as the validation time for certificate expiry checks. Per the record, an attacker holding the private key of an expired but previously trusted certificate can backdate that value so that newly signed tokens are accepted.
Exploitation and workarounds
None of the three records states that these flaws have been exploited. The records give no workaround for the crash or the certificate-time issue, and they do not describe how to detect either one.
What to do
- Upgrade JWTKit to version 5.8.0, the fixed version named in all three records.
- Until the upgrade is applied, applications relying on the built-in identity token verification should add an explicit audience check with audience.verifyIntendedAudience(...), as the record for CVE-2026-142551 describes.
The 3 vulnerabilities
- CVE-2026-142551 8.1 JWTKit is a Swift library for signing and verifying JSON Web Tokens. From 4.0.0 until 5.8.0, JWTSigner.verify() in Sources/JWTKit/JWTSigner.swift invokes payload verification after validating the JWS signature, but AppleIdentityToken, Goog…
- CVE-2026-142550 7.5 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 b…
- CVE-2026-142549 4.9 JWTKit is a Swift library for signing and verifying JSON Web Tokens. Prior to 5.8.0, X5CVerifier.verifyJWS() in Sources/JWTKit/X5C/X5CVerifier.swift reads ValidationTimePayload.signedDate, defined in Sources/JWTKit/X5C/ValidationTimePayloa…
Frequently asked questions
How many vapor jwt-kit vulnerabilities were published on December 2, 2026?
3 vulnerabilities: 2 high, 1 medium, with CVSS scores up to 8.1.
Are any of them being exploited?
None of them is in CISA's Known Exploited Vulnerabilities catalog yet.
Which one should be fixed first?
CVE-2026-142551 (CVSS 8.1): JWTKit is a Swift library for signing and verifying JSON Web Tokens. From 4.0.0 until 5.8.0, JWTSigner.verify() in Sources/JWTKit/JWTSigner.swift invokes payload verification after validating the JWS…