keystore-goに改ざん検知と認証を回避される脆弱性、2.1.0以前が対象
Summary
keystore-goのDecode処理に、末尾のSHA-1ダイジェストを削除されると整合性検査と鍵ストアのパスワード確認をすり抜けられる脆弱性が見つかりました。書き込み権限を持つ攻撃者は、信頼するCA証明書を、パスワードを知らないまま追加や置き換えでき、TLS通信の傍受や改ざんにつながるおそれがあります。影響するのは2.1.0以前で、修正版は3.0.0です。
AI summary
Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.
keystore-goのDecode処理に、末尾のSHA-1ダイジェストを削除されると整合性検査と鍵ストアのパスワード確認をすり抜けられる脆弱性が見つかりました。書き込み権限を持つ攻撃者は、信頼するCA証明書を、パスワードを知らないまま追加や置き換えでき、TLS通信の傍受や改ざんにつながるおそれがあります。影響するのは2.1.0以前で、修正版は3.0.0です。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| pavlo-v-chernykhkeystore-go | — | Not listed |
| Gogithub.com/pavel-v-chernykh/keystore-go |
≤ 2.1.0→ Not listed |
Not listed |
| Gogithub.com/pavel-v-chernykh/keystore-go/v3 |
< 3.0.0→ 3.0.0 |
3.0.0 |
Original description The description as published by the source.
keystore-go is a Go implementation of the Java KeyStore encoder and decoder. In 2.1.0 and earlier, keystore.Decode in decoder.go does not check the error returned when reading the trailing SHA-1 integrity digest and bounds its comparison by the length of the digest actually read. If an attacker with write access removes the final 20-byte digest from a modified JKS file, the empty actual digest causes the comparison loop to execute zero times and Decode returns the parsed keystore without an error. For certificate-only stores using TrustedCertificateEntry values, this bypasses both tamper detection and password verification, allowing trusted CA certificates to be added or replaced without knowing the keystore password and potentially enabling interception or modification of TLS connections that trust the forged CA. This issue is fixed in version 3.0.0.
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- advisory github.com
- advisory github.com
- advisory nvd.nist.gov
- package github.com
- patch github.com
- web github.com
- web github.com