{"id":"CVE-2026-17510","state":"PUBLISHED","title":"Crypt::OpenSSL::PKCS12 versions before 1.98 for Perl allow a NULL pointer dereference in print_attribute via a zero length BMPSTRING attribute","description":"Crypt::OpenSSL::PKCS12 versions before 1.98 for Perl allow a NULL pointer dereference in print_attribute via a zero length BMPSTRING attribute.\n\nprint_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.\n\nAny 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.","publishedAt":"2026-08-09T01:21:30.439Z","updatedAt":"2026-08-12T17:35:54.067Z","severity":{"score":7.5,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","source":"CISA-ADP"},"assigner":"CPANSec","products":["JONASBN Crypt::OpenSSL::PKCS12"],"affected":[{"vendor":"JONASBN","product":"Crypt::OpenSSL::PKCS12","packageName":"Crypt-OpenSSL-PKCS12","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"1.98","versionType":"custom"}],"collectionURL":"https://cpan.org/modules","programFiles":["PKCS12.xs"],"programRoutines":[{"name":"Crypt::OpenSSL::PKCS12::info_as_hash"}],"repo":"https://github.com/dsully/perl-crypt-openssl-pkcs12"}],"references":["https://metacpan.org/release/JONASBN/Crypt-OpenSSL-PKCS12-1.98/source/Changes.md","https://github.com/dsully/perl-crypt-openssl-pkcs12/commit/6cb282d8d8e8ded4859551cd2d3cfa7c6028ce48.patch","http://www.openwall.com/lists/oss-security/2026/08/09/1"],"weaknesses":["CWE-476"],"ingestedAt":"2026-10-29T20:11:00.674Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/17xxx/CVE-2026-17510.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-17510","state":"PUBLISHED","datePublished":"2026-08-09T01:21:30.439Z","dateUpdated":"2026-08-12T17:35:54.067Z","assignerShortName":"CPANSec","assignerOrgId":"9b29abf9-4ab0-4765-b253-1875cd9b441e","dateReserved":"2026-07-27T00:17:17.758Z"},"containers":{"cna":{"title":"Crypt::OpenSSL::PKCS12 versions before 1.98 for Perl allow a NULL pointer dereference in print_attribute via a zero length BMPSTRING attribute","descriptions":[{"lang":"en","value":"Crypt::OpenSSL::PKCS12 versions before 1.98 for Perl allow a NULL pointer dereference in print_attribute via a zero length BMPSTRING attribute.\n\nprint_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.\n\nAny 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."}],"affected":[{"vendor":"JONASBN","product":"Crypt::OpenSSL::PKCS12","packageName":"Crypt-OpenSSL-PKCS12","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"1.98","versionType":"custom"}],"collectionURL":"https://cpan.org/modules","programFiles":["PKCS12.xs"],"programRoutines":[{"name":"Crypt::OpenSSL::PKCS12::info_as_hash"}],"repo":"https://github.com/dsully/perl-crypt-openssl-pkcs12"}],"references":[{"url":"https://metacpan.org/release/JONASBN/Crypt-OpenSSL-PKCS12-1.98/source/Changes.md","tags":["release-notes"]},{"url":"https://github.com/dsully/perl-crypt-openssl-pkcs12/commit/6cb282d8d8e8ded4859551cd2d3cfa7c6028ce48.patch","tags":["patch"]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-476","description":"CWE-476 NULL Pointer Dereference","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"CPANSec","orgId":"9b29abf9-4ab0-4765-b253-1875cd9b441e","dateUpdated":"2026-08-09T01:21:30.439Z"},"solutions":[{"lang":"en","value":"Upgrade to Crypt::OpenSSL::PKCS12 1.98 or later, which sizes the buffer on the decoded string length plus one and writes an explicit terminator."}],"source":{"discovery":"UNKNOWN"},"workarounds":[{"lang":"en","value":"For deployments that cannot upgrade to 1.98, ensure that PKCS#12 files passed to info_as_hash() come from trusted sources."}],"x_generator":{"engine":"cpansec-cna-tool 0.1"}},"adp":[{"title":"CVE Program Container","references":[{"url":"http://www.openwall.com/lists/oss-security/2026/08/09/1"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2026-08-09T03:32:58.521Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":7.5,"attackVector":"NETWORK","baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","integrityImpact":"NONE","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"NONE","confidentialityImpact":"NONE"}},{"other":{"type":"ssvc","content":{"timestamp":"2026-08-12T17:35:51.161155Z","id":"CVE-2026-17510","options":[{"Exploitation":"none"},{"Automatable":"yes"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-08-12T17:35:54.067Z"}}]}}}