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

CVE-2026-8507

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

Description

Crypt::OpenSSL::PKCS12 versions through 1.94 for Perl have out-of-bounds (OOB) write flaws. When parsing a PKCS12 file, with a >= 1 GiB OCTET STRING (or BIT STRING) attribute on a SAFEBAG, via info() or info_as_hash(), a heap out-of-bounds write would be triggered with remote-code-execution potential (RCE) due to a signed integer overflow in the size calculation passed to Renew().

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; use Crypt::OpenSSL::PKCS12; # PoC Trigger for CVE-2026-8507 # Description: This script demonstrates the vulnerable code path. # It requires a crafted PKCS12 file with a large attribute (>1 GiB). my $filename = 'exploit.p12'; # In a real scenario, 'exploit.p12' is a malicious file containing # a SAFEBAG with an OCTET STRING attribute >= 1 GiB. print "Attempting to parse file: $filename\n"; eval { # Load the malicious PKCS12 file my $pkcs12 = Crypt::OpenSSL::PKCS12->new_from_file($filename); # The vulnerability is triggered here due to integer overflow # in size calculation passed to Renew(). my $info = $pkcs12->info(); # Alternatively: my $info_hash = $pkcs12->info_as_hash(); print "Parsing successful (Vulnerability likely patched)\n"; }; if ($@) { print "Exception caught: $@\n"; print "This may indicate a crash due to OOB write.\n"; }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-8507", "sourceIdentifier": "9b29abf9-4ab0-4765-b253-1875cd9b441e", "published": "2026-05-17T19:16:24.590", "lastModified": "2026-05-18T17:40:45.343", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "Crypt::OpenSSL::PKCS12 versions through 1.94 for Perl have out-of-bounds (OOB) write flaws.\n\nWhen parsing a PKCS12 file, with a >= 1 GiB OCTET STRING (or BIT STRING) attribute on a SAFEBAG, via info() or info_as_hash(), a heap out-of-bounds write would be triggered with remote-code-execution potential (RCE) due to a signed integer overflow in the size calculation passed to Renew()."}], "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-787"}]}], "references": [{"url": "https://github.com/dsully/perl-crypt-openssl-pkcs12/commit/b9d0469c6d8f5b5c6c2a45a3d0647a532b749397.patch", "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"}, {"url": "https://github.com/dsully/perl-crypt-openssl-pkcs12/issues/55", "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"}, {"url": "https://github.com/dsully/perl-crypt-openssl-pkcs12/issues/56", "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"}, {"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/5", "source": "af854a3a-2127-422b-91ae-364da2661108"}]}}