# CVE-2026-8721: Crypt::OpenSSL::PKCS12 password truncation via embedded NULLs

Source: https://junglewise.ai/threats/cve-2026-8721-crypt-openssl-pkcs12-password-truncation-via-embedded-nulls  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-05-17. Updated: 2026-05-17  
License: CC BY 4.0 with a link back

CVE-2026-8721 · Severity: info · CVSS 0 · Published 2026-05-17

A security issue in a Perl library used for handling PKCS#12 certificates (digital files used for secure communication) causes passwords to be cut off if they contain a specific hidden character (a NULL byte). This means that complex, machine-generated passwords might be significantly shorter and weaker than intended, making it easier for unauthorized parties to guess them or bypass security controls. Organizations using this library to manage encrypted certificates or keys should update to ensure their passwords maintain full strength.

## Quick answers

**Is CVE-2026-8721 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-8721 being exploited in the wild.

**How severe is CVE-2026-8721?** Informational severity, with a CVSS score of 0, published 17 May 2026.

**Which products and versions are affected?** JONASBN Crypt::OpenSSL::PKCS12 through 1.94.

**Is there a fix for CVE-2026-8721?** A patch was published on 2026-05-17: Fixed in version 1.95 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-8721 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2026-8721?** Check whether anything you run is named in the advisory. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

The vulnerability exists in the XS (External Subroutine) layer of Crypt::OpenSSL::PKCS12. Password parameters in PKCS12.xs were declared as 'char *', which causes Perl's default typemap to use SvPV_nolen, effectively discarding the explicit string length tracked by Perl. Subsequent calls to strlen() in the C code or within the OpenSSL library itself result in the password being truncated at the first NULL byte. This is particularly impactful for binary, KDF-derived, or HMAC-derived passwords where NULL bytes are common, as it silently reduces the entropy of the secret. Version 1.95 fixes this by using SvPV to preserve the full byte count and adding explicit checks for NULL bytes in APIs that do not support them.

## Affected products

- JONASBN Crypt::OpenSSL::PKCS12 through 1.94

## Timeline

- 2026-05-17: disclosed
- 2026-05-17: patched: Fixed in version 1.95
- 2026-05-17: advisory

## References

- [https://metacpan.org/release/JONASBN/Crypt-OpenSSL-PKCS12-1.95/view/Changes.md](https://metacpan.org/release/JONASBN/Crypt-OpenSSL-PKCS12-1.95/view/Changes.md)
