CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-MPWR-8VM7-H73F

GHSA-mpwr-8vm7-h73f: Key Space Collapse and Authentication Bypass in go-pkcs12 PBMAC1 Decoding

Amit Schendel
Amit Schendel
Senior Security Researcher

Aug 18, 2026·7 min read·12 visits

Executive Summary (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.

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.

Vulnerability Overview

The PKCS#12 standard, defined in RFC 7292 and updated in RFC 9579, provides an archive format for storing cryptographic objects such as private keys and certificates. To guarantee the integrity and authenticity of these sensitive structures, PKCS#12 files typically use a Password-Based Message Authentication Code (PBMAC) to verify that the file has not been altered. The library software.sslmate.com/src/go-pkcs12 implements these decoding features for Go applications, specifically via the Decode, DecodeChain, DecodeTrustStore, and ToPEM functions.

A critical vulnerability, tracked as GHSA-mpwr-8vm7-h73f and GO-2026-5052, exists in the library's handling of the Password-Based Message Authentication Code 1 (PBMAC1) integrity mechanism. The bug class is classified as CWE-354 (Improper Validation of Integrity Check Value). The flaw arises because the decoding functions fail to validate the KeyLength parameter specified within the PBKDF2 parameters of the PKCS#12 structure.

This vulnerability is mathematically and conceptually equivalent to the OpenSSL flaw CVE-2026-34181. When an application parses an untrusted PKCS#12 file containing a manipulated KeyLength parameter, it is possible for an attacker to achieve a successful integrity bypass. This allows the injecting of unauthorized certificates or keys without knowledge of the correct decryption password.

Root Cause Analysis

The root cause of GHSA-mpwr-8vm7-h73f lies in the trust placed in attacker-controlled metadata within the PKCS#12 container. When PBMAC1 is used for integrity protection, the standard specifies that a key must be derived from a user password using a Key Derivation Function, typically PBKDF2. The parameters for this derivation process, including the salt, iteration count, and target key length, are encoded in the ASN.1 structure of the PKCS#12 file itself.

In vulnerable versions of the go-pkcs12 library, the parser retrieves the KeyLength parameter from the PBKDF2 configuration block and passes it directly to the PBKDF2 key derivation algorithm without verifying its size or ensuring it meets a safe minimum threshold. An attacker can set this parameter to an extremely small value, such as 1 byte (8 bits), instead of the standard length of 20 bytes or more.

Setting KeyLength to 1 byte collapses the entropy of the derived key space from 2^160 or more possible values to just 256 possible keys (0x00 through 0xFF). When the target application processes the file, it executes the PBKDF2 function using the true user-supplied password, but the output is truncated to a single byte. Consequently, the Message Authentication Code (MAC) is computed using a 1-byte key, allowing a brute-force or probabilistic bypass because the attacker only needs to guess one of the 256 possible key values to forge a matching MAC.

Code Analysis

The vulnerability exists within the PBMAC1 processing logic in mac.go. The library parses the PBKDF2 parameters and extracts the key length parameter to derive the HMAC key. Below is a comparison of the vulnerable and patched code paths.

// Vulnerable Code Path in mac.go
func doPBMAC1(algorithm pkix.AlgorithmIdentifier, message, password []byte) ([]byte, error) {
    // ...
    if kdfParams.KeyLength <= 0 {
        return nil, errors.New("pkcs12: PBMAC1 requires explicit KeyLength parameter in PBKDF2 parameters")
    }
    // The kdfParams.KeyLength is used directly without verifying if it is too small
    keyLen := kdfParams.KeyLength
 
    // Derive key using PBKDF2
    key := pbkdf2.Key(password, salt, iterations, keyLen, hashFunc)
    // ...
}

To remediate this issue, a check was introduced in commit 03c441f6b0267f695ca02464133c0b373bf4dd55 to reject keys shorter than 20 bytes, as recommended by RFC 9579. This prevents the key truncation attack.

// Patched Code Path in mac.go
func doPBMAC1(algorithm pkix.AlgorithmIdentifier, message, password []byte) ([]byte, error) {
    // ...
    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
    if kdfParams.KeyLength < 20 {
        return nil, errors.New("pkcs12: PBMAC1 key length is too short")
    }
    keyLen := kdfParams.KeyLength
 
    // Derive key using PBKDF2
    key := pbkdf2.Key(password, salt, iterations, keyLen, hashFunc)
    // ...
}

By enforcing KeyLength >= 20, the library guarantees that the key used for the subsequent HMAC operation retains a high level of cryptographic strength. This successfully mitigates the key space collapse vector.

Exploitation Methodology

Exploitation of this vulnerability requires the attacker to construct a custom, unencrypted PKCS#12 payload containing forged credentials (such as an unauthorized Root CA or a specific private key). The attacker then serializes this payload alongside a manipulated PBMAC1 metadata block. Within the PBKDF2 parameter block, the attacker specifies a KeyLength of 1 byte.

Because the attacker does not know the actual password used by the target application, they must select an arbitrary 1-byte key guess, denoted as K_guess. The attacker then computes the HMAC of the forged payload using this 1-byte key and sets the resulting digest as the MAC value within the PKCS#12 file. When the target application decodes the file, it will derive its own 1-byte key K_actual using the correct password.

There is a 1-in-256 (approximately 0.39%) probability that K_actual matches K_guess because both are bounded to the exact same 1-byte range. If the values match, the computed HMAC matches the stored HMAC, and the library accepts the forged container as authentic. An attacker can repeatedly present files or exploit systems processing multiple automated inputs to bypass the validation.

Impact Assessment

The impact of a successful exploitation of GHSA-mpwr-8vm7-h73f is severe. By bypassing the password integrity check, an attacker can coerce an application into accepting arbitrary certificates and private keys. This can lead to a complete breakdown of trust controls within systems that rely on PKCS#12 files for authentication, identity propagation, or secure communication.

In scenarios where the application imports root certificates from PKCS#12 files to build trust stores, an attacker can install a malicious Root CA (MITRE ATT&CK T1553.004). This enables the interception and decryption of TLS traffic or the forging of software signatures. Alternatively, if the file is used to store client certificates, the attacker can impersonate authorized users or services, leading to unauthorized access.

The CVSS v3.1 score for the underlying cryptographic flaw (CVE-2026-34181) is 7.4 (High), reflecting high integrity and confidentiality impacts. Although the exploitation is probabilistic, the lack of operational complexity and the absence of required privileges make it a highly viable attack vector against automated data ingestion pipelines.

Remediation and Mitigation

The primary remediation path is to upgrade the software.sslmate.com/src/go-pkcs12 library to version v0.7.2 or later. This version introduces the strict 20-byte minimum key length validation check on PBMAC1 parameters, neutralizing the key space collapse vulnerability. Developers can update their projects by running go get -u software.sslmate.com/src/go-pkcs12@v0.7.2 followed by go mod tidy.

If immediate upgrading is not feasible, organizations should implement input validation controls at the network perimeter or application boundary. PKCS#12 files from untrusted sources should be blocked or subjected to pre-parsing validation where the ASN.1 structure is inspected. Any container specifying a PBKDF2 key length of less than 20 bytes should be rejected immediately prior to decryption attempts.

Additionally, applications processing PKCS#12 archives should enforce strict rate-limiting and robust security auditing. Since a successful bypass has a low mathematical probability per attempt, an attacker must typically submit multiple files to achieve a successful verification. Monitoring and alerting on repeated PKCS#12 decryption or integrity failures can detect and mitigate active exploitation attempts in real time.

Fix Analysis (1)

Technical Appendix

CVSS Score
7.4/ 10
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
EPSS Probability
0.24%
Top 85% most exploited

Affected Systems

software.sslmate.com/src/go-pkcs12

Affected Versions Detail

Product
Affected Versions
Fixed Version
go-pkcs12
SSLMate
>= 0.6.0, < 0.7.20.7.2
AttributeDetail
CWE IDCWE-354
Attack VectorNetwork
CVSS v3.1 Severity7.4 (High)
EPSS Score0.00235
Exploit StatusProof of Concept / Theoretical
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1553.004Subvert Trust Controls: Install Root Certificate
Defense Evasion
T1556Modify Authentication Process
Credential Access
CWE-354
Improper Validation of Integrity Check Value

The product receives input accompanied by an integrity check value (such as a MAC), but fails to validate or incorrectly validates the key parameters used to generate and verify that value.

Known Exploits & Detection

Go Vulnerability DatabaseGHSA metadata tracking the authentication bypass flaw.

Vulnerability Timeline

OpenSSL project publishes security advisory for CVE-2026-34181
2026-06-09
SSLMate developers identify vulnerable code in go-pkcs12 and publish fix commit
2026-06-22
Go vulnerability database issues GO-2026-5052
2026-06-22
GitHub issues security advisory GHSA-MPWR-8VM7-H73F
2026-08-17

References & Sources

  • [1]GitHub Advisory GHSA-mpwr-8vm7-h73f
  • [2]SSLMate Security Advisory
  • [3]Fix Commit 03c441f6b0267f695ca02464133c0b373bf4dd55
  • [4]OpenSSL Security Advisory (2026-06-09)
  • [5]OpenSSL Vulnerability CVE-2026-34181
Related Vulnerabilities
CVE-2026-34181

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•1 day ago•CVE-2026-11748
6.9

CVE-2026-11748: Unauthenticated LDAP Injection in Central Dogma Server Authentication

An LDAP injection vulnerability exists in the centraldogma-server-auth-shiro module of LY Corporation Central Dogma before version 0.84.0. The search logic dynamically constructs LDAP search filters by interpolating user-provided usernames without escaping RFC 4515 metacharacters. Unauthenticated remote attackers can leverage this flaw to bypass authentication, enumerate directory hierarchies, and access unauthorized resources.

Alon Barad
Alon Barad
9 views•6 min read
•1 day ago•CVE-2026-11746
9.4

CVE-2026-11746: Use of Hard-coded ZooKeeper Replication Secret 'ch4n63m3' in Central Dogma Server

CVE-2026-11746 is a critical vulnerability in Central Dogma Server prior to version 0.84.0, where an embedded ZooKeeper replication secret silently falls back to a publicly known, hard-coded default string ('ch4n63m3'). Remote attackers with access to the replication network can authenticate as legitimate cluster peers, potentially leading to unauthorized data exposure, state manipulation, or complete cluster takeover.

Amit Schendel
Amit Schendel
7 views•6 min read
•1 day ago•CVE-2026-56665
4.2

CVE-2026-56665: Logical Validation Bypass in ZITADEL External JWT Identity Provider

A logical verification flaw in ZITADEL's external JWT Identity Provider validation allows attackers to bypass session expiration checks. If an incoming JWT lacks the 'exp' claim, the system skips validation entirely, creating an indefinitely valid session. This issue has been addressed in versions 3.4.12 and 4.15.2.

Alon Barad
Alon Barad
6 views•7 min read
•1 day ago•CVE-2026-59149
6.5

CVE-2026-59149: Sibling Directory Path Traversal in Mockoon Backend Server

CVE-2026-59149 identifies a directory traversal vulnerability in `@mockoon/commons-server`, the backend mock-server library powering the Mockoon application. The flaw occurs in the path containment validation logic used during raw file response generation. An unauthenticated attacker can exploit this weakness to retrieve arbitrary files from sibling directories sharing a common prefix with the designated static base directory.

Amit Schendel
Amit Schendel
9 views•5 min read
•1 day ago•CVE-2026-59148
8.8

CVE-2026-59148: Unauthenticated Administrative API and CORS Misconfiguration in Mockoon

An in-depth analysis of CVE-2026-59148, a high-severity flaw in Mockoon where unauthenticated administrative endpoints and a wildcard Cross-Origin Resource Sharing (CORS) policy allow remote execution, state poisoning, and credential theft.

Alon Barad
Alon Barad
11 views•6 min read
•1 day ago•CVE-2026-56666
4.8

CVE-2026-56666: Account Takeover via Improper Email Verification in ZITADEL Federated Identity Handler

An improper authentication vulnerability (CWE-287) in ZITADEL's external identity provider handler before version 4.15.3 allows remote attackers to perform complete account takeover. When auto-linking by email is enabled, ZITADEL verifies that the local target account has a verified email address but fails to verify if the external provider confirmed ownership of that same email. Attackers can exploit this by registering an unverified account with a victim's email address on a permissive external provider, leading to unauthorized account binding and persistent access.

Amit Schendel
Amit Schendel
7 views•7 min read