Skip to main content

keystore-go CVE-2026-76101

| EUVDEUVD-2026-129317 HIGH
Unchecked Return Value (CWE-252)
2026-11-18 GitHub_M GHSA-j282-pjg5-j643
7.1
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain write access to .jks truststore
  2. Delivery
    Replace trusted CA certificate with attacker CA
  3. Exploit
    Strip trailing 20-byte SHA-1 digest
  4. Execution
    Decode() returns forged store without error
  5. Impact
    MITM TLS connections trusting forged CA

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A10:2025 - Mishandling of Exceptional Conditions
ASVS 5.0
V16 - Security Logging and Error Handling Return value checking
Exploitation Conditions

Exploitation requires the attacker to have write access to the target .jks keystore file on disk - this is the mandatory precondition and the reason the vector is local (AV:L). The condition is specifically triggered by removing the final 20-byte trailing SHA-1 integrity digest from a modified JKS file, after which keystore.Decode (legacy module github.com/pavel-v-chernykh/keystore-go ≤ v2.1.0) accepts the tampered store with err == nil. The attack is most impactful against certificate-only truststores holding TrustedCertificateEntry values, because for those stores the trailing digest is the ONLY place the keystore password is verified, so stripping it bypasses both tamper detection and password verification entirely. Limiting factors: the attacker gains nothing without file-write access, no keystore password knowledge is needed, no authentication to the consuming application and no user interaction are required, and only applications using this library's vulnerable legacy versions to load JKS truststores are affected. Keystores containing password-protected private key entries are less affected since those entries have additional per-entry protection.

Impact

This is a genuine integrity/authentication-bypass flaw whose real-world priority is moderate rather than urgent, and the signals largely agree. The CVSS 3.1 vector (AV:L/AC:L/PR:L/UI:N) and CVSS 7.1 score correctly capture the defining constraint: exploitation is NOT remote-unauthenticated - the attacker must already be able to WRITE to the .jks truststore file on disk, which is why the official vector uses AV:L and PR:L. A fully working proof-of-concept is published in the GHSA advisory, so publicly available exploit code exists; however, this is NOT the same as active exploitation. No CISA KEV listing is present in the input and no EPSS score was supplied, so there is no evidence of in-the-wild use - exploitation requires a pre-existing write primitive on the victim's filesystem (compromised deployment artefact, writable config volume, local user), making it a privilege-escalation/trust-manipulation step rather than an internet-facing entry point. The vuln.today Decision label is 'this_week', consistent with a serious-but-not-emergency bug: high confidentiality and integrity impact (forged CA enabling TLS MITM) gated behind a file-write precondition. Net: treat as a prompt-but-not-drop-everything fix, prioritised for any service that loads attacker-reachable JKS truststores via this library's legacy v2 path.

Exploit ScenarioDerived

An attacker who can write to a JKS truststore file used by a Go service (for example through a writable config volume, a tampered deployment artefact, or a compromised low-privileged account) replaces a trusted CA certificate with their own and deletes the final 20-byte SHA-1 digest from the file. Because keystore.Decode ignores the short-read error and bounds its comparison by the zero-length digest it actually read, the service loads the forged truststore without error and without needing the keystore password. A working PoC demonstrating acceptance of both correct and wrong passwords is published in the advisory; the forged CA then lets the attacker intercept or modify TLS connections the service trusts.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 18, 2026

Integrity-check and password-verification bypass in the legacy keystore-go v2 module path (github.com/pavel-v-chernykh/keystore-go ≤ v2.1.0+incompatible) lets an attacker with write access to a .jks truststore replace or add trusted CA certificates without knowing the keystore password, simply by deleting the file's final 20-byte SHA-1 digest before the consuming Go program decodes it. Because certificate-only stores built from TrustedCertificateEntry values rely on that trailing digest as their only tamper check and their only password verification, the forged store loads with err == nil, which can enable interception or modification of TLS connections that trust the injected CA. The issue is fixed in v3.0.0 and in the /v3 and /v4 module paths, but there is no fixed release on the bare v2 path; exploitation requires local file-write access (AV:L, PR:L), no CISA KEV entry exists, and the upstream advisory publishes a public proof-of-concept reproduction.

RemediationAI

Migrate off the unversioned v2 import path to a module path that contains the fix: github.com/pavlo-v-chernykh/keystore-go/v4 (v4.0.0 or later; v4.4.0 or later for the renamed path) or github.com/pavel-v-chernykh/keystore-go/v3 (v3.0.0 or later), which incorporate commit af93effd832cf1aef7794e69c31e1b668e17b851 with the missing error check and a full-length bytes.Compare of the trailing SHA-1 digest; the release is at https://github.com/pavlo-v-chernykh/keystore-go/releases/tag/v3.0.0. There is no fixed release on the bare github.com/pavel-v-chernykh/keystore-go module path - every v1.x and v2.x release predates the fix - so changing the import path is the only complete remedy and requires a code change plus a dependency-graph update rather than a version bump. Until that migration lands, reduce exposure by tightening filesystem write permissions on the .jks truststore files themselves (and on the config volumes and deployment artifacts that deliver them), since the exploitable precondition is exactly an attacker who can write to the keystore file; this does not change the library behavior and does not detect tampering that has already occurred, and operators who assumed the keystore password gated integrity should treat any such truststore as unverified until it is re-generated or reloaded with a patched module path. Follow the advisory at https://github.com/pavlo-v-chernykh/keystore-go/security/advisories/GHSA-j282-pjg5-j643 for the upstream guidance.

Affected VersionsENISA

keystore-go < 3.0.0

Affected Packages

go github.com/pavel-v-chernykh/keystore-go no fix
go github.com/pavel-v-chernykh/keystore-go/v3 fix: 3.0.0
euvd keystore_go fix: 3.0.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 3 packages in go, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The Java KeyStore (JKS) file format's sole integrity guarantee is a trailing 20-byte digest computed as SHA1(passwordBytes || "Mighty Aphrodite" || body). In keystore-go's decoder.go, Decode() reads that digest with ksd.readBytes(uint32(ksd.md.Size())), which delegates to io.ReadFull and returns (nil, ErrIo) on a short read or EOF. The returned error is assigned but never inspected, and the subsequent byte-comparison loop is bounded by len(actualDigest) instead of the computed digest length. When the trailing 20 bytes are absent, actualDigest is nil, the loop body executes zero times, and Decode() falls through to return keyStore, nil - a textbook unchecked-return-value defect (CWE-252), with the downstream consequences classified as improper verification of cryptographic signature (CWE-347) and improper validation of integrity check value (CWE-354). The reference Java JavaKeyStore implementation uses DataInputStream.readFully and throws on a short read, so this Go port diverges from the behavior applications reasonably expect. Commit af93effd832cf1aef7794e69c31e1b668e17b851 (2019-09-16, "Update to go1.13") added an err != nil guard after the digest read and replaced the truncated loop with a full-length bytes.Compare(actualDigest, computedDigest); that commit first shipped in tag v3.0.0, so every release on the bare github.com/pavel-v-chernykh/keystore-go module path (v1.0.0 through v2.1.0+incompatible) still carries the defect. Impact is greatest for truststores containing only TrustedCertificateEntry values, since for those entries the trailing digest is the only point at which the keystore password is checked; stores holding password-protected private key entries have additional per-entry protection and are less affected. The trigger is confirmed by the advisory as stripping the final 20 bytes of the file after modifying certificate content.

Know when Java gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 7.1 HIGH
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
vuln.today AI 7.1 HIGH

Requires file-write access to the keystore (AV:L, PR:L), reliably triggered by deleting 20 bytes (AC:L); forged CA enables TLS MITM yielding high C and I, no availability impact.

3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
4.0 AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

Lifecycle Timeline

2
Patch available
Nov 18, 2026 - 23:19 EUVD
CVE Published
Nov 18, 2026 - 21:49 cve.org
HIGH 7.1

DescriptionCVE.org

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.

Technical POC Analysis

CWE-252 (Unchecked Return Value); the advisory also maps CWE-347 and CWE-354.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

A high-severity vulnerability in the legacy keystore-go v2 module path affects Go applications that load .jks truststores with certificate-only entries, allowing an attacker with local write access to bypass password protection and inject trusted CA certificates. This could enable man-in-the-middle attacks on TLS connections that trust the forged store, impacting any system relying on such truststores. Leadership should prioritize inventorying affected applications and planning migration.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis; interim mitigations include restricting local file-write access to truststore files, enabling file integrity monitoring to detect unauthorized modifications, and prioritizing migration to v3.0.0 or /v3 or /v4 module paths.

Threat Intelligence Overview

EPSS Score
0.1%
Top 100% exploitable
Prevalence
Low
niche Go library for parsing Java KeyStore files
Threat Intel
1
1 source
Social Media
1
Sightings
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact
High

Priority Score

36
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +36
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

More in Java

View all
CVE-2012-4681 CRITICAL POC
9.8 Aug 28

Oracle Java SE 7 Update 6 and earlier contains multiple sandbox bypass vulnerabilities via the ClassFinder and forName m

CVE-2015-7450 CRITICAL POC
9.8 Jan 02

Remote code execution in IBM Sterling B2B Integrator, Sterling Integrator, and Tivoli Common Reporting allows unauthenti

CVE-2013-2465 CRITICAL POC
9.8 Jun 18

Java Runtime Environment sandbox bypass via incorrect image channel verification in 2D component allows remote unauthent

CVE-2011-3544 CRITICAL POC
9.8 Oct 19

Oracle Java SE JDK/JRE 7 and 6 Update 27 and earlier allows remote code execution with complete system compromise throug

CVE-2010-1871 HIGH POC
8.8 Aug 05

JBoss Seam 2 in Red Hat JBoss EAP 4.3.0 fails to sanitize JBoss Expression Language inputs, allowing remote attackers to

CVE-2012-1723 CRITICAL POC
9.8 Jun 16

Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 update 4 and earlier, 6 up

CVE-2013-0422 CRITICAL POC
9.8 Jan 10

Multiple vulnerabilities in Oracle Java 7 before Update 11 allow remote attackers to execute arbitrary code by (1) using

CVE-2012-0507 CRITICAL POC
9.8 Jun 07

Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 Update 2 and earlier, 6 Up

CVE-2015-4852 CRITICAL POC
9.8 Nov 18

The WLS Security component in Oracle WebLogic Server 10.3.6.0, 12.1.2.0, 12.1.3.0, and 12.2.1.0 allows remote attackers

CVE-2012-5076 CRITICAL POC
9.8 Oct 16

Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 Update 7 and earlier allow

CVE-2017-3066 CRITICAL POC
9.8 Apr 27

Remote unauthenticated attackers can execute arbitrary code on Adobe ColdFusion servers through Java deserialization fla

CVE-2012-0391 CRITICAL POC
9.8 Jan 08

The ExceptionDelegator component in Apache Struts before 2.2.3.1 interprets parameter values as OGNL expressions during

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy