JWTKitのIDトークン検証で別アプリ向けのトークンを受け入れる脆弱性、認証を回避されるおそれ
概要
JWTKitの4.0.0から5.8.0までは、Apple・Google・MicrosoftのIDトークンでaudクレームを検証しないため、別のクライアント向けに発行されたトークンが受け入れられるおそれがあります。組み込みの検証だけで認証を判断しているアプリでは、認証を回避されたり、アカウントを乗っ取られたりするおそれがあります。修正版は5.8.0なので、JWTKitを5.8.0以降に更新し、独自にaudienceを確認していないアプリは早めに対応してください。
AI要約
SecPulse が外部の生成 AI を使って作った要約です。誤りを含むことがあります。重要な判断の前に、下の原文と参照URLを確認してください。
JWTKitの4.0.0から5.8.0までは、Apple・Google・MicrosoftのIDトークンでaudクレームを検証しないため、別のクライアント向けに発行されたトークンが受け入れられるおそれがあります。組み込みの検証だけで認証を判断しているアプリでは、認証を回避されたり、アカウントを乗っ取られたりするおそれがあります。修正版は5.8.0なので、JWTKitを5.8.0以降に更新し、独自にaudienceを確認していないアプリは早めに対応してください。
影響パッケージ
| パッケージ | 影響を受ける版 → 修正版 | |
|---|---|---|
| vaporjwt-kit | — | 記載なし |
| swiftgithub.com/vapor/jwt-kit |
5.8.0 未満→ 5.8.0 |
5.8.0 |
| SwiftURLgithub.com/vapor/jwt-kit |
4.0.0 以上 5.8.0 未満→ 5.8.0 |
5.8.0 |
原文の説明 取得元が公開している説明をそのまま載せています (多くは英語)。
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, GoogleIdentityToken, and MicrosoftIdentityToken in Sources/JWTKit/Vendor/AppleIdentityToken.swift, Sources/JWTKit/Vendor/GoogleIdentityToken.swift, and Sources/JWTKit/Vendor/MicrosoftIdentityToken.swift do not validate the aud claim against the application's intended audience. An attacker can obtain a legitimate provider-issued ID token for an attacker-controlled OAuth or OIDC client and submit it to a different application using the same provider keys. If that application relies on the built-in verification as its authentication decision without a separate audience.verifyIntendedAudience(...) check, the token can be accepted despite being intended for another client. Depending on the application's identity mapping, the resulting cross-client token reuse can enable authentication bypass or account takeover. Applications that independently validate the intended audience are not affected through this issue. This issue is fixed in 5.8.0.
出典: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
参照URL
- advisory github.com
- advisory nvd.nist.gov
- advisory github.com
- package github.com
- patch github.com
- web github.com
- web github.com