CVE-2026-17510: CWE-476 NULL Pointer Dereference in JONASBN Crypt::OpenSSL::PKCS12
Crypt::OpenSSL::PKCS12 versions before 1.98 for Perl allow a NULL pointer dereference in print_attribute via a zero length BMPSTRING attribute. print_attribute() sizes the destination buffer for a BMPSTRING attribute from its declared byte length with `Renew(*attribute, length, char)`. A zero length attribute makes that a zero size reallocation, which Perl implements as a free returning NULL, so the buffer pointer becomes NULL, the following `strncpy` copies nothing, and the caller dereferences NULL in the `strlen()` it passes to `newSVpvn()`. A zero length BMPSTRING is even length, so the ASN.1 decoder accepts it and the value reaches this code. The UTF8STRING, OCTET STRING and BIT STRING arms size on `length + 1` or `length * 4 + 1` and are unaffected. Any caller that passes an untrusted PKCS#12 file to info_as_hash() can crash the process. info() prints attribute values directly without sizing a buffer and is unaffected.
AI Analysis
Technical Summary
Crypt::OpenSSL::PKCS12 versions prior to 1.98 contain a NULL pointer dereference in the print_attribute function. This happens because the function allocates a buffer based on the declared byte length of a BMPSTRING attribute. When the attribute length is zero, the buffer allocation results in a NULL pointer. Subsequent operations dereference this NULL pointer, causing a crash. The vulnerability is triggered by zero length BMPSTRING attributes, which are accepted by the ASN.1 decoder. Other string types such as UTF8STRING, OCTET STRING, and BIT STRING are unaffected. The vulnerability can be exploited by passing a crafted PKCS#12 file to the info_as_hash() function, causing denial of service via process crash.
Potential Impact
An attacker can cause a denial of service by crashing any process that calls info_as_hash() with a crafted PKCS#12 file containing a zero length BMPSTRING attribute. There is no impact on confidentiality or integrity. The vulnerability does not allow code execution or data disclosure but results in service disruption.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, avoid processing untrusted PKCS#12 files with info_as_hash(). The info() function is not affected and can be used as a safer alternative for printing attribute values.
CVE-2026-17510: CWE-476 NULL Pointer Dereference in JONASBN Crypt::OpenSSL::PKCS12
Description
Crypt::OpenSSL::PKCS12 versions before 1.98 for Perl allow a NULL pointer dereference in print_attribute via a zero length BMPSTRING attribute. print_attribute() sizes the destination buffer for a BMPSTRING attribute from its declared byte length with `Renew(*attribute, length, char)`. A zero length attribute makes that a zero size reallocation, which Perl implements as a free returning NULL, so the buffer pointer becomes NULL, the following `strncpy` copies nothing, and the caller dereferences NULL in the `strlen()` it passes to `newSVpvn()`. A zero length BMPSTRING is even length, so the ASN.1 decoder accepts it and the value reaches this code. The UTF8STRING, OCTET STRING and BIT STRING arms size on `length + 1` or `length * 4 + 1` and are unaffected. Any caller that passes an untrusted PKCS#12 file to info_as_hash() can crash the process. info() prints attribute values directly without sizing a buffer and is unaffected.
CVSS v3.1
Score 7.5high
Affected software
pkg:github/Crypt-OpenSSL-PKCS12Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Crypt::OpenSSL::PKCS12 versions prior to 1.98 contain a NULL pointer dereference in the print_attribute function. This happens because the function allocates a buffer based on the declared byte length of a BMPSTRING attribute. When the attribute length is zero, the buffer allocation results in a NULL pointer. Subsequent operations dereference this NULL pointer, causing a crash. The vulnerability is triggered by zero length BMPSTRING attributes, which are accepted by the ASN.1 decoder. Other string types such as UTF8STRING, OCTET STRING, and BIT STRING are unaffected. The vulnerability can be exploited by passing a crafted PKCS#12 file to the info_as_hash() function, causing denial of service via process crash.
Potential Impact
An attacker can cause a denial of service by crashing any process that calls info_as_hash() with a crafted PKCS#12 file containing a zero length BMPSTRING attribute. There is no impact on confidentiality or integrity. The vulnerability does not allow code execution or data disclosure but results in service disruption.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, avoid processing untrusted PKCS#12 files with info_as_hash(). The info() function is not affected and can be used as a safer alternative for printing attribute values.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- CPANSec
- Date Reserved
- 2026-07-27T00:17:17.758Z
- Cvss Version
- null
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a77dae5bf8831d539c0e90f
Added to database: 08/09/2026, 01:41:57 UTC
Last enriched: 08/16/2026, 14:22:42 UTC
Last updated: 09/07/2026, 22:52:09 UTC
Views: 63
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.