Security Vulnerability Report
中文
CVE-2026-8721 CVSS 9.8 CRITICAL

CVE-2026-8721

Published: 2026-05-17 19:16:25
Last Modified: 2026-05-18 13:16:35
Source: 9b29abf9-4ab0-4765-b253-1875cd9b441e

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.

CVSS Details

CVSS Score
9.8
Severity
CRITICAL
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

No configuration data available.

Crypt::OpenSSL::PKCS12 <= 1.94

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/perl use strict; use warnings; # Note: This is a conceptual PoC to demonstrate the vulnerability trigger. # It requires the vulnerable version of Crypt::OpenSSL::PKCS12. # Simulate a password with an embedded NULL byte # In secure systems, passwords might be binary data or derived keys. my $full_password = "HighEntropySecret" . "\x00" . "RemainingData"; my $pass_len = length($full_password); print "Intended Password Length: $pass_len\n"; print "Intended Password (Hex): " . unpack("H*", $full_password) . "\n"; # In the vulnerable version (<= 1.94), when this password is passed to the module: # 1. Perl passes the buffer and length (ignored). # 2. C code calls strlen() on the buffer. # 3. strlen() stops at \x00. # 4. Effectively, the password becomes just "HighEntropySecret". print "\nVulnerability Impact:\n"; print "Effective Password used by OpenSSL: 'HighEntropySecret'\n"; print "Effective Length: 16\n"; print "Entropy Loss: The bytes after the NULL are discarded.\n"; # This significantly reduces the search space for brute-force attacks.

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-8721", "sourceIdentifier": "9b29abf9-4ab0-4765-b253-1875cd9b441e", "published": "2026-05-17T19:16:25.310", "lastModified": "2026-05-18T13:16:34.843", "vulnStatus": "Received", "cveTags": [], "descriptions": [{"lang": "en", "value": "Crypt::OpenSSL::PKCS12 versions through 1.94 for Perl truncates passwords with embedded NULLs.\n\nPassword parameters in PKCS12.xs are declared char *, which routes through Perl's default typemap to SvPV_nolen. The Perl length is discarded.\n\nThe 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."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 9.8, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 5.9}]}, "weaknesses": [{"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-170"}]}], "references": [{"url": "https://metacpan.org/release/JONASBN/Crypt-OpenSSL-PKCS12-1.95/view/Changes.md", "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"}, {"url": "http://www.openwall.com/lists/oss-security/2026/05/17/6", "source": "af854a3a-2127-422b-91ae-364da2661108"}]}}