Skip to main content

Crypt::OpenSSL::X509 CVE-2026-58102

CRITICAL
Out-of-bounds Read (CWE-125)
2026-07-13 CPANSec
9.1
CVSS 3.1 · Vendor: CPANSec
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Craft X.509 cert with oversized extension OID
  2. Delivery
    Deliver cert to Perl app parsing it
  3. Exploit
    App calls extensions()/has_extension_oid() building hv_exts
  4. Install
    OBJ_obj2txt length used as hash-key size
  5. C2
    Read past 129-byte buffer allocation
  6. Execute
    Adjacent heap bytes returned as hash key
  7. Impact
    Memory disclosed or parser crash

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, read limits
MITRE ATT&CK

1 technique across 1 tactic: Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the target Perl application parse an attacker-supplied X.509 certificate AND invoke one of the OID/long-name extension-enumeration functions on it - specifically extensions(), extensions_by_long_name(), extensions_by_oid(), or has_extension_oid() - since these drive the vulnerable hv_exts() long-OID path. The malicious certificate must contain at least one extension whose textual OID exceeds the fixed 129-byte buffer. What LIMITS exploitation: applications that never call these functions on untrusted certificates are not exposed, and those that use extensions_by_name() (static short-name path) are explicitly unaffected; the impact is bounded to disclosing adjacent heap memory or triggering a crash rather than code execution (SSVC Technical Impact: partial). No authentication is required (PR:N) because certificates are typically accepted from unauthenticated peers, but the module version must be earlier than 2.1.3.

Impact

The raw CVSS 3.1 score is 9.1 (AV:N/AC:L/PR:N/UI:N/C:H/I:N/A:H), which looks critical, but the multi-source signals temper that: CISA SSVC rates Exploitation as 'none', Automatable 'yes', and Technical Impact only 'partial' - consistent with an information-disclosure/crash bug rather than code execution. There is no KEV listing and no EPSS score supplied, and no public exploit is identified at time of analysis, so this is not evidence of active exploitation. The AV:N/PR:N/UI:N metrics are technically defensible because a certificate can arrive over the network with no authentication, but they understate a real precondition: the victim application must actually call one of the vulnerable extension-enumeration functions on the attacker-controlled certificate. The impact is also narrower than C:H suggests - the leak is bounded adjacent-heap memory surfaced as a hash key, and A:H reflects a possible crash if the over-read hits unmapped memory rather than reliable denial of service. Net: a genuine, easy-to-trigger memory-safety defect worth patching promptly wherever untrusted certificates are parsed, but 'Automatable: yes / Exploitation: none / Technical Impact: partial' argues this is a moderate real-world priority, not an emergency, absent evidence of exploitation.

Exploit ScenarioDerived

An attacker crafts an X.509 certificate containing an extension whose OID renders to a textual form longer than 129 bytes and presents it to a Perl service (for example a TLS client-cert validator, S/MIME processor, or certificate-inspection tool) that enumerates extensions via extensions() or has_extension_oid(). When the module builds the extension hash, OBJ_obj2txt()'s length is used as the hash-key length, reading past the buffer and returning adjacent heap bytes as the key - which the application may log, store, or return, disclosing process memory or crashing the parser. No public exploit is identified at time of analysis, and the low attack complexity (AC:L) means only a single malicious certificate is needed.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 14, 2026

Heap out-of-bounds read in the Crypt::OpenSSL::X509 Perl module (versions before 2.1.3) lets a crafted X.509 certificate leak adjacent heap memory to an application that enumerates certificate extensions. When code calls extensions(), extensions_by_long_name(), extensions_by_oid(), or has_extension_oid(), a certificate extension whose textual OID exceeds the fixed 129-byte buffer causes the returned hash key to include bytes read past the allocation, exposing process memory and risking a crash. No public exploit is identified at time of analysis and it is not in CISA KEV, but the fix is confirmed in release 2.1.3 and the flaw is trivially triggerable by any attacker who can supply a certificate.

RemediationAI

Vendor-released patch: upgrade to Crypt::OpenSSL::X509 version 2.1.3 or later, which sizes the key buffer to the length reported by OBJ_obj2txt() and stores strlen() of the written key instead of the return value (fix commit https://github.com/dsully/perl-crypt-openssl-x509/commit/757289bfce095455c104d4adfe9312e7b339620f.patch; release notes at https://metacpan.org/release/JONASBN/Crypt-OpenSSL-X509-2.1.3/source/Changes.md). Update via your CPAN client (e.g. cpanm Crypt::OpenSSL::X509@2.1.3) or your OS/distro package once it ships 2.1.3. If you cannot upgrade immediately, the concrete compensating control is to avoid the affected code paths on untrusted input: do not call extensions(), extensions_by_long_name(), extensions_by_oid(), or has_extension_oid() on attacker-supplied certificates, and where you only need name-based lookups use extensions_by_name(), which uses the static short-name path and is not affected (trade-off: you lose access to arbitrary/long-OID extensions). Alternatively, pre-validate or reject certificates before parsing (e.g. via a hardened OpenSSL preprocessing step), accepting the added processing overhead. See the oss-security advisory at https://seclists.org/oss-sec/2026/q3/129 for details.

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Crypt::OpenSSL::X509 is a widely-used CPAN binding (XS/C glue over OpenSSL) that lets Perl programs parse and inspect X.509 certificates. The bug lives in the hv_exts() routine in X509.xs, which builds a Perl hash of certificate extensions. It calls OpenSSL's OBJ_obj2txt() to render each extension's object identifier (OID) into a fixed 129-byte stack/heap buffer, but OBJ_obj2txt() returns the FULL textual length the OID would require, not the number of bytes actually written to the buffer. That return value is then passed to hv_store() as the key length, so for an OID whose text is longer than the buffer, hv_store() reads bytes beyond the allocation. This is a classic CWE-125 Out-of-bounds Read: a length/size confusion between 'bytes written' and 'bytes needed'. The affected code path is limited to functions that use the numeric/long OID path; extensions_by_name(), which uses the static OpenSSL short-name path, is explicitly not affected. Per the CPE cpe:2.3:a:jonasbn:crypt::openssl::x509, all versions prior to 2.1.3 are impacted.

Know when Crypt gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (CPANSec) PRIMARY 9.1 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
vuln.today AI 8.2 HIGH

A single crafted certificate parsed by the app triggers it (AV:N/AC:L/PR:N/UI:N); heap disclosure justifies C:H, while an over-read only sometimes crashes, so A:L not A:H and no integrity impact.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:L
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (CPANSec).

CVSS VectorVendor: CPANSec

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
High

Lifecycle Timeline

3
CVSS changed
Jul 14, 2026 - 13:22 NVD
9.1 (CRITICAL)
CVE Published
Jul 13, 2026 - 22:22 cve.org
UNKNOWN (no severity yet)
CVE Published
Jul 13, 2026 - 22:22 cve.org
CRITICAL 9.1

DescriptionCVE.org

Crypt::OpenSSL::X509 versions before 2.1.3 for Perl allow a heap out-of-bounds read via a long certificate extension OID in hv_exts.

When building the extension hash (via extensions(), extensions_by_long_name(), extensions_by_oid(), or has_extension_oid()), the code passes OBJ_obj2txt()'s return value as the hash-key length; because that value is the OID's full text length rather than the bytes written to the fixed-size buffer (129 bytes), an OID whose text is longer than the 129-byte buffer causes a read past the allocation, exposing adjacent heap memory as the returned hash key. extensions_by_name() uses the static shortname path and is not affected.

Executive ViewAI

Why It Matters

A critical vulnerability in the Crypt::OpenSSL::X509 Perl module (versions before 2.1.3) enables heap memory disclosure when applications process crafted X.509 certificates, risking exposure of sensitive data and service interruptions. While no public exploit code has been identified at time of analysis, the flaw is trivially triggerable, making any organization using this module immediately vulnerable if exposed to untrusted certificates. Vendor-released patch version 2.1.3 is available and must be deployed urgently across all affected systems.

Business Impact: Severe
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.1%
Top 99% exploitable
Prevalence
Medium
common CPAN X.509 module, but niche Perl-language footprint
Data Quality
6 sources
Confidence: High
NVD CVE.org EPSS Vulnrichment GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
Very High
Technical Impact
Partial

Priority Score

46
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +46
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

Affected Products (CPE)CVE.org

cpe:2.3:a:jonasbn:crypt::openssl::x509:*:*:*:*:*:*:*:*

More in Crypt

View all
CVE-2026-16235 CRITICAL
9.8 Jul 20

Predictable salt generation in Crypt::Password through version 0.28 for Perl weakens the security of stored password has

CVE-2026-30909 CRITICAL
9.8 Mar 08

Perl Crypt::NaCl::Sodium module through 2.002 has potential integer overflows in cryptographic operations that could wea

CVE-2025-15444 CRITICAL
9.8 Jan 06

Crypt::Sodium::XS for Perl bundles a vulnerable version of libsodium (<= 1.0.20) that has a signature verification flaw.

CVE-2026-9265 CRITICAL
9.1 Jun 20

Heap out-of-bounds read in the Perl module Crypt::OpenSSL::PKCS12 before version 1.96 lets a crafted PKCS#12 file leak a

CVE-2026-2588 CRITICAL
9.1 Feb 23

Integer overflow in Crypt::NaCl::Sodium Perl module through version 2.001 on 32-bit systems. The Sodium.xs binding casts

CVE-2026-14570 HIGH
7.5 Jul 05

Private-key recovery in the Crypt::DSA Perl module (all versions before 1.22) stems from a biased random number generato

CVE-2026-17510 HIGH
7.5 Aug 09

NULL pointer dereference in Crypt::OpenSSL::PKCS12 before version 1.98 for Perl enables process crashes when any caller

CVE-2026-6656 HIGH
7.5 Jul 20

Timing side-channel in the Crypt::Password Perl module (versions through 0.28) allows attackers to incrementally guess a

CVE-2026-58101 HIGH
7.5 Jul 13

Denial of service in the Crypt::OpenSSL::X509 Perl module before 2.1.3 lets a malformed X.509 certificate crash any Perl

CVE-2026-2597 HIGH
7.5 Feb 27

Heap buffer overflow in Crypt::SysRandom::XS before version 0.010 allows denial of service through negative length param

CVE-2026-2474 HIGH
7.5 Feb 16

Heap buffer overflow in Perl's Crypt::URandom module (versions 0.41-0.54) allows denial of service through integer wrapa

CVE-2026-30910 HIGH
7.5 Mar 08

Crypt::Sodium::XS versions through 0.001000 for Perl has potential integer overflows. Combined aead encryption, combined

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy