Description
Crypt::OpenSSL::PKCS12 versions before 1.96 for Perl permits a heap OOB read in print_attribute UTF8STRING path.

print_attribute() copies a UTF8STRING ASN.1 attribute value into a heap buffer sized exactly to its declared length via strncpy, leaving no NUL terminator. Downstream callers run strlen() on the result and pass the inflated length to newSVpvn(), copying attacker-influenced adjacent heap bytes into a Perl scalar.
Published: 2026-06-20
Score: n/a
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Crypt::OpenSSL::PKCS12 versions prior to 1.96 contain a flaw in the print_attribute() routine. The routine copies a UTF8STRING ASN.1 attribute value into a heap buffer sized exactly to its declared length using strncpy, producing a buffer without a terminating NUL character. Later code calls strlen() on this buffer and passes the inflated length to newSVpvn(), which then copies adjacent heap bytes that were not part of the intended attribute into a Perl scalar. This out‑of‑bounds read can expose arbitrary data that resides next to the buffer in memory, such as sensitive credentials or cryptographic material, and is classified as CWE‑125.

Affected Systems

Crypt::OpenSSL::PKCS12 modules from JONASBN that are older than version 1.96 for Perl are affected. Every build of the module before 1.96 contains the vulnerable print_attribute implementation and is therefore susceptible to the heap OOB read.

Risk and Exploitability

Exploitation requires an attacker to supply a crafted PKCS12 file that triggers print_attribute(). The vector exists in any application that processes PKCS12 inputs without validation using the vulnerable module. No publicly disclosed exploits are known, the EPSS score is unavailable, and the issue is not listed in the CISA KEV catalog. The lack of a CVSS rating precludes a formal severity level, but the potential for arbitrary memory disclosure represents a significant information‑leak risk. The likely attack path is via an application’s handling of malicious PKCS12 data.

Generated by OpenCVE AI on June 20, 2026 at 03:20 UTC.

Remediation

Vendor Solution

Upgrade to version 1.96 or apply the linked patch.


OpenCVE Recommended Actions

  • Upgrade Crypt::OpenSSL::PKCS12 to version 1.96 or newer.
  • Apply the patch referenced in the GitHub commit if upgrading cannot be performed immediately.
  • Audit all code paths that invoke print_attribute() to ensure they do not process untrusted PKCS12 inputs.

Generated by OpenCVE AI on June 20, 2026 at 03:20 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Sat, 20 Jun 2026 03:45:00 +0000

Type Values Removed Values Added
First Time appeared Jonasbn
Jonasbn crypt::openssl::pkcs12
Vendors & Products Jonasbn
Jonasbn crypt::openssl::pkcs12

Sat, 20 Jun 2026 01:45:00 +0000

Type Values Removed Values Added
Description Crypt::OpenSSL::PKCS12 versions before 1.96 for Perl permits a heap OOB read in print_attribute UTF8STRING path. print_attribute() copies a UTF8STRING ASN.1 attribute value into a heap buffer sized exactly to its declared length via strncpy, leaving no NUL terminator. Downstream callers run strlen() on the result and pass the inflated length to newSVpvn(), copying attacker-influenced adjacent heap bytes into a Perl scalar.
Title Crypt::OpenSSL::PKCS12 versions before 1.96 for Perl permits a heap OOB read in print_attribute UTF8STRING path
Weaknesses CWE-125
References

Subscriptions

Jonasbn Crypt::openssl::pkcs12
cve-icon MITRE

Status: PUBLISHED

Assigner: CPANSec

Published:

Updated: 2026-06-20T00:46:07.737Z

Reserved: 2026-05-22T01:38:26.750Z

Link: CVE-2026-9265

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-06-20T03:30:15Z

Weaknesses