CVE-2026-9265: Crypt::OpenSSL::PKCS12 versions before 1.96 for Perl permits a heap OOB read in print_attribute UTF8STRING path Timothy Legge 20 Jun 2026 00:59 UTC

========================================================================
CVE-2026-9265                                        CPAN Security Group
========================================================================

         CVE ID:  CVE-2026-9265
   Distribution:  Crypt-OpenSSL-PKCS12
       Versions:  before 1.96

       MetaCPAN:  https://metacpan.org/dist/Crypt-OpenSSL-PKCS12
       VCS Repo:  https://github.com/dsully/perl-crypt-openssl-pkcs12

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

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.

Problem types
-------------
- CWE-125 Out-of-bounds Read

Solutions
---------
Upgrade to version 1.96 or apply the linked patch.

References
----------
https://github.com/dsully/perl-crypt-openssl-pkcs12/issues/55
https://metacpan.org/release/JONASBN/Crypt-OpenSSL-PKCS12-1.96/source/Changes.md
https://github.com/dsully/perl-crypt-openssl-pkcs12/commit/a7bd2f319fa8aab8177b3d767ea06dd85ceb3173.patch