Junglewise Threat Intelligence

go-pkcs12 authentication bypass in Decode functions

Severity: medium · CVSS 6.3 · Published 2026-08-17

Executive brief

go-pkcs12 is a Go library for parsing PKCS#12 certificate and key files, which are commonly used to store cryptographic credentials. The library's decoding functions improperly validate password-based authentication by accepting files encoded with incorrect passwords. An attacker can craft a malicious PKCS#12 file that appears valid despite using a wrong password, potentially allowing unauthorized access to certificates and private keys if the application relies on password verification as a security control.

Technical details

The vulnerability is an improper input validation flaw (CWE-20) in the PKCS#12 decoding functions. The root cause is a failure to properly validate PBMAC1 (password-based MAC) key length; the library accepts excessively-short keys that should be rejected according to PKCS#12 specifications. An unauthenticated attacker can craft a malicious PKCS#12 file with a short PBMAC1 key that will pass validation even though it was encrypted with a different password than the one provided by the decoder. The attack requires the victim to decode a PKCS#12 file from an untrusted source and rely on password-based authentication; applications that only process trusted PKCS#12 files are unaffected. The vulnerability is patched in version 0.7.2; affected versions are 0.6.0 through 0.7.1.

Affected products

  • SSLMate go-pkcs12 0.6.0 through 0.7.1

Timeline

  • 2026-06-10: disclosed: Advisory published by SSLMate
  • 2026-06-10: patched: Patched in version 0.7.2
  • 2026-08-17: advisory: Updated in GitHub Advisory Database

References