Description
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.
Severity (CVSS)
| Base score | 7.1 |
|---|---|
| Severity | High |
| Version | CVSS 3.1 |
| Vector | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N |
| Provided by | CNA |
Weaknesses
- CWE-252 — CWE-252: Unchecked Return Value
- CWE-347 — CWE-347: Improper Verification of Cryptographic Signature
- CWE-354 — CWE-354: Improper Validation of Integrity Check Value
Affected products
| Vendor | Product | Versions |
|---|---|---|
| pavlo-v-chernykh | keystore-go | < 3.0.0 [affected] |
References
- https://github.com/pavlo-v-chernykh/keystore-go/security/advisories/GHSA-j282-pjg5-j643 (x_refsource_CONFIRM)
- https://github.com/pavlo-v-chernykh/keystore-go/commit/af93effd832cf1aef7794e69c31e1b668e17b851 (x_refsource_MISC)
- https://github.com/pavlo-v-chernykh/keystore-go/releases/tag/v3.0.0 (x_refsource_MISC)
Assess this vulnerability
Compare your deployed product and version with the source record. Review vendor references for fixes and workarounds. A CVSS score describes technical severity; it does not establish that your systems are affected or that exploitation has occurred.
Browse all CVE security advisories · Symaro cybersecurity services
Generated from the official CVE List on 19 Nov 2026 08:05 UTC.