GHSA-mpwr-8vm7-h73f: Key Space Collapse and Authentication Bypass in go-pkcs12 PBMAC1 Decoding
Vulnerability ID: GHSA-MPWR-8VM7-H73F
CVSS Score: 7.4
Published: 2026-08-17
A security vulnerability in the Go library software.sslmate.com/src/go-pkcs12 allows remote attackers to bypass password-based integrity verification. By crafting a PKCS#12 file with an excessively short KeyLength parameter in the PBMAC1 configuration, the derived MAC key space collapses, allowing an attacker to forge arbitrary certificate structures and private keys that are incorrectly verified as valid.
TL;DR
An authentication and integrity bypass flaw in go-pkcs12 allows attackers to forge PKCS#12 files by configuring a 1-byte PBMAC1 key length, collapsing the validation keyspace to 256 possibilities.
⚠️ Exploit Status: POC
Technical Details
- CWE ID: CWE-354
- Attack Vector: Network
- CVSS v3.1 Severity: 7.4 (High)
- EPSS Score: 0.00235
- Exploit Status: Proof of Concept / Theoretical
- CISA KEV Status: Not Listed
Affected Systems
- software.sslmate.com/src/go-pkcs12
-
go-pkcs12: >= 0.6.0, < 0.7.2 (Fixed in:
0.7.2)
Code Analysis
Commit: 03c441f
Reject PBMAC1 key lengths less than 20
@@ -124,6 +124,10 @@
if kdfParams.KeyLength <= 0 {
return nil, errors.New("pkcs12: PBMAC1 requires explicit KeyLength parameter in PBKDF2 parameters")
}
+ // RFC 9579 RECOMMENDS rejecting key lengths less than 20; this is necessary to prevent possible authentication bypass (e.g. OpenSSL's CVE-2026-34181)
+ if kdfParams.KeyLength < 20 {
+ return nil, errors.New("pkcs12: PBMAC1 key length is too short")
+ }
keyLen := kdfParams.KeyLength
// Derive key using PBKDF2
Exploit Details
- Go Vulnerability Database: GHSA metadata tracking the authentication bypass flaw.
Mitigation Strategies
- Upgrade the go-pkcs12 dependency to version v0.7.2 or higher.
- Implement client-side or boundary checks to inspect the ASN.1 structure of PKCS#12 containers before processing.
- Enforce API rate-limiting on endpoints that ingest and parse PKCS#12 files to mitigate multi-attempt brute-force attacks.
Remediation Steps:
- Open your Go project's terminal.
- Run the command:
go get -u software.sslmate.com/src/go-pkcs12@v0.7.2 - Execute
go mod tidyto clean up dependencies and update thego.sumfile. - Verify deployment using
govulncheck ./...to confirm the vulnerability is no longer reported.
References
- GitHub Advisory GHSA-mpwr-8vm7-h73f
- SSLMate Security Advisory
- Fix Commit 03c441f6b0267f695ca02464133c0b373bf4dd55
- OpenSSL Security Advisory (2026-06-09)
- OpenSSL Vulnerability CVE-2026-34181
Read the full report for GHSA-MPWR-8VM7-H73F on our website for more details including interactive diagrams and full exploit analysis.
Top comments (0)