Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain write access to .jks truststore
-
DeliveryReplace trusted CA certificate with attacker CA
-
ExploitStrip trailing 20-byte SHA-1 digest
-
ExecutionDecode() returns forged store without error
-
ImpactMITM 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
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.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.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.
Articles & Coverage 1
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
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.
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
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
Oracle Java SE 7 Update 6 and earlier contains multiple sandbox bypass vulnerabilities via the ClassFinder and forName m
Remote code execution in IBM Sterling B2B Integrator, Sterling Integrator, and Tivoli Common Reporting allows unauthenti
Java Runtime Environment sandbox bypass via incorrect image channel verification in 2D component allows remote unauthent
Oracle Java SE JDK/JRE 7 and 6 Update 27 and earlier allows remote code execution with complete system compromise throug
JBoss Seam 2 in Red Hat JBoss EAP 4.3.0 fails to sanitize JBoss Expression Language inputs, allowing remote attackers to
Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 update 4 and earlier, 6 up
Multiple vulnerabilities in Oracle Java 7 before Update 11 allow remote attackers to execute arbitrary code by (1) using
Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 Update 2 and earlier, 6 Up
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
Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 Update 7 and earlier allow
Remote unauthenticated attackers can execute arbitrary code on Adobe ColdFusion servers through Java deserialization fla
The ExceptionDelegator component in Apache Struts before 2.2.3.1 interprets parameter values as OGNL expressions during
EUVD-2026-129317
GHSA-j282-pjg5-j643
NVD
CVE.org
EPSS
VulDB
Exploit-DB