Crypt::OpenSSL::PKCS12: Improper Null Termination
CVE-2026-8721 is a critical-severity improper null termination vulnerability in Crypt::OpenSSL::PKCS12 from Jonasbn, with a CVSS 3.1 base score of 9.8 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. Affected Crypt::OpenSSL::PKCS12 versions: 1.94 and earlier. The record does not name a fixed version, so check the vendor advisory. There is no confirmed exploitation so far. EPSS estimates a 0.45% chance of exploitation within 30 days, which is low compared with other CVEs.
Critical severity: a successful attack would have severe impact.
What to do
- Check which version of Crypt::OpenSSL::PKCS12 you run against the affected versions below, and install the vendor's latest release.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| JONASBN | Crypt::OpenSSL::PKCS12 | 1.94 and earlier | Not stated |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H. Scored by CISA (ADP).
Official description
Crypt::OpenSSL::PKCS12 versions through 1.94 for Perl truncates passwords with embedded NULLs. Password parameters in PKCS12.xs are declared char *, which routes through Perl's default typemap to SvPV_nolen. The Perl length is discarded. The C code (or OpenSSL internally) calls strlen() on the buffer. Any password byte at or after the first NULL is silently dropped. Binary / KDF-derived / HMAC-derived passwords lose entropy without any warnings.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Improper Null Termination
The product does not terminate or incorrectly terminates a string or array with a null character or equivalent terminator.
How developers prevent this class of flaw
- Use a language that is not susceptible to these issues. However, be careful of null byte interaction errors (CWE-626) with lower-level constructs that may be written in a language that is susceptible.
- Ensure that all string functions used are understood fully as to how they append null characters. Also, be wary of off-by-one errors when appending nulls to the end of strings.
- If performance constraints permit, special code can be added that validates null-termination of string buffers, this is a rather naive and error-prone solution.
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: yes, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Other references
Other vulnerabilities in Crypt::OpenSSL::PKCS12
- 7.5 High severity
- 9.1 Critical severity
- 9.8 Critical severity
Recent Improper Null Termination vulnerabilities
- 9.8 Critical severity
- 7.1 High severity
- 7.1 High severity
- 7.5 High severity
- 7.1 High severity
- 7.5 High severity
Spotted an error? Tell us.