cvelo
P2 · HighCVSS 7.1EPSS <0.1%

keystore-go: Keystore integrity and password verification bypass via stripped trailing digest in Decode(), impacting legacy v2 versions

  • CVE-2026-76101
  • GHSA-j282-pjg5-j643
  • GO-2026-7002
  • EUVD-2026-129317

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.

Text from the CVE.org record.

Recommendation

Taken from the version ranges the sources state. Check the vendor advisory: nothing is said about versions the ranges do not list. Breaking-change risk is read from the version numbers only.

Affected

  • pavlo-v-chernykh keystore-go

    Affected versionsFixed in
    < 3.0.0none stated
  • github.com/pavel-v-chernykh/keystore-goGo

    Affected versionsFixed in
    up to 2.1.0none stated
  • github.com/pavel-v-chernykh/keystore-go/v3Go

    Affected versionsFixed in
    before 3.0.03.0.0

Product versions from the CVE.org record.

Timeline

  1. Published

Related news

No article from the followed outlets names this vulnerability.