CVE-2026-142551 — Github.com/vapor/jwt-kit — CWE-287 · CWE-345
### Summary `AppleIdentityToken`, `GoogleIdentityToken`, and `MicrosoftIdentityToken` validate a signed ID token's issuer and expiry, but do not validate that the `aud` claim is intended for the current application. This allows cross-client ID token reuse when an application relies on JWTKit's built-in vendor token verification as complete authentication. An attacker can obtain a legitimate Apple/Google/Microsoft ID token for an attacker-controlled OAuth/OIDC client and submit it to a different application using the same provider keys. JWTKit accepts the token even though its `aud` identifies the attacker's client, not the victim application. The exact account-level impact depends on how the application maps provider identities, but the security boundary is already broken once a token issued for another relying party is accepted as a verified login token. ### Details `JWTSigner.verify()` verifies the JWS signature and then automatically calls the payload's `verify(using:)` method: - `Sources/JWTKit/JWTSigner.swift:33-39` ```swift guard try algorithm.verify(signature, signs: data) else { throw JWTError.signatureVerificationFailed } let (_, payload, _) = try parser.parse(token, as: Payload.self) try await payload.verify(using: algorithm) ``` For the vendor ID token payload types, `verify(using:)` does not check `audience`: - `Sources/JWTKit/Vendor/AppleIdentityToken.swift:85-90` checks only `iss` and `exp` - `Sources/JWTKit/Vendor/GoogleIdentityToken.swift:139-148
### Summary `AppleIdentityToken`, `GoogleIdentityToken`, and `MicrosoftIdentityToken` validate a signed ID token's issuer and expiry, but do not validate that the `aud` claim is intended for the current application. This allows cross-client ID token reuse when an application relies on JWTKit's built-in vendor token verification as complete authentication. An attacker can obtain a legitimate Apple/Google/Microsoft ID token for an attacker-controlled OAuth/OIDC client and submit it to a different application using the same provider keys. JWTKit accepts the token even though its `aud` identifies the attacker's client, not the victim application. The exact account-level impact depends on how the application maps provider identities, but the security boundary is already broken once a token issued for another relying party is accepted as a verified login token. ### Details `JWTSigner.verify()` verifies the JWS signature and then automatically calls the payload's `verify(using:)` method: - `Sources/JWTKit/JWTSigner.swift:33-39` ```swift guard try algorithm.verify(signature, signs: data) else { throw JWTError.signatureVerificationFailed } let (_, payload, _) = try parser.parse(token, as: Payload.self) try await payload.verify(using: algorithm) ``` For the vendor ID token payload types, `verify(using:)` does not check `audience`: - `Sources/JWTKit/Vendor/AppleIdentityToken.swift:85-90` checks only `iss` and `exp` - `Sources/JWTKit/Vendor/GoogleIdentityToken.swift:139-148
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CVE-2026-142551
CVSS 8.1/10 · HIGH · 02.12.2026
CWE: CWE-287, CWE-345
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 WHAT IS THIS VULNERABILITY?
Authentication Bypass
Summary: ### Summary
AppleIdentityToken, GoogleIdentityToken, and MicrosoftIdentityToken validate a signed ID token's issuer and expiry, but do not validate that the aud claim is intended for the current application. This allows cross-client ID token reuse when an application relies on JWTKit's built-in vendor token verification as complete authentication. An attacker can obtain a legitimate Ap…
Affected: github.com/vapor/jwt-kit
⚡ ATTACK VECTOR
Network / Remote (AV:N) · no authentication required (PR:N) · user interaction required (UI:R) · low attack complexity (AC:L).
🌍 REAL WORLD IMPACT
All confidential data readable/stealable; data can be modified or deleted.
🛡️ REMEDIATION
→ Apply vendor security update for github.com/vapor/jwt-kit.
→ Add MFA, strengthen sessions, implement rate limiting.
→ Pre-patch: put service behind VPN or apply IP allowlist.
→ Add WAF rule, create IDS alert for anomalous traffic.
⚠️ URGENCY
⚠️ This week (7 days) — High risk, anonymous remote.
────────────────────────────────────────
[Automated Technical Vulnerability & CVSS Vector Analysis]