Go
CVE-2026-76101
keystore-go: Keystore integrity and password verification bypass via stripped trailing digest in Decode()
- Severity
- High 7.1
- Published
- 19 Nov 2026
- Last changed
- 19 Nov 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 3.0.0
- Exploit chance
- under 0.1% in the next 30 daysEPSS by FIRST, 24 Nov 2026
- Attack
- Needs local access · Needs a user account · No user action needed
- Attacker can
- Read data · Change data
- CVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N- Also known as
- GHSA-j282-pjg5-j643
- Sources
- OSV.dev and GitHub
Description
keystore.Decode() fails to check the error returned when reading the trailing SHA-1 integrity digest of a JKS keystore. If an attacker removes the final 20 bytes from a .jks file, the digest read returns an empty slice and the byte-comparison loop never executes, so Decode() returns the parsed keystore with err == nil. This defeats both tamper detection and — for certificate-only truststores — the password check itself, allowing an attacker with write access to a keystore file (but without knowledge of the keystore password) to silently inject or replace trusted CA certificates.
Affected versions: github.com/pavel-v-chernykh/keystore-go ≤ v2.1.0+incompatible (the final release on this module path). v3 and v4 releases are not impacted.
In decoder.go, function Decode, lines 264-272:
Two defects combine here:
- The err returned by ksd.readBytes(20) on line 265 is assigned but never inspected.
- The comparison loop on line 266 is bounded by len(actualDigest) rather than…
Affected software
| Software | Affected versions |
|---|---|
github.com/pavel-v-chernykh/keystore-goGo · osv:Go:github.com/pavel-v-chernykh/keystore-go |
|
github.com/pavel-v-chernykh/keystore-go/v3Go · osv:Go:github.com/pavel-v-chernykh/keystore-go/v3 |
|
About github.com/pavel-v-chernykh/keystore-go
This is the only vulnerability in github.com/pavel-v-chernykh/keystore-go in our list.
About github.com/pavel-v-chernykh/keystore-go/v3
This is the only vulnerability in github.com/pavel-v-chernykh/keystore-go/v3 in our list.
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-76101
- GitHub Advisory Database https://github.com/advisories/GHSA-j282-pjg5-j643