Vulnerability record
keystore-go: Keystore integrity and password verification bypass via stripped trailing digest in Decode(), impacting legacy v2 versions
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…
7.1/CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:NExploitability
AV:LAC:LPR:LUI:NScope
S:UImpact
C:HI:HA:NRemediation
No fixed version has been published for this vulnerability yet. Check the references below for vendor advisories, workarounds and mitigation guidance.
Sources