LiveActive security incident?Get immediate response
CVE Record

CVE-2026-2597: Crypt::SysRandom::XS versions before 0.010 for Perl is vulnerable to a heap buffer overflow in the XS function random_bytes()

Crypt::SysRandom::XS versions before 0.010 for Perl is vulnerable to a heap buffer overflow in the XS function random_bytes(). The function does not validate that the length parameter is non-negative. If a negative value (e.g. -1) is supplied, the expression length + 1u causes an integer wraparound, resulting in a zero-byte allocation. The subsequent call to chosen random function (e.g. getrandom) passes the original negative value, which is implicitly converted to a large unsigned value (typically SIZE_MAX). This can result in writes beyond the allocated buffer, leading to heap memory corruption and application crash (denial of service). In common usage, the length argument is typically hardcoded by the caller, which reduces the likelihood of attacker-controlled exploitation. Applications that pass untrusted input to this parameter may be affected.

HighCVSS 7.5Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

A Perl randomness library, Crypt::SysRandom::XS, can crash an application if its random_bytes() function receives a negative length. Most normal use hardcodes this length, so broad real-world exposure is likely limited. Risk increases where an application lets external input control the requested byte count.

Executive priority

Prioritize remediation for internet-facing or multi-tenant Perl services that use this module with user-controlled sizes. For internal applications with hardcoded lengths, handle through normal dependency update cycles. The primary business risk is service disruption, not data theft, based on current sources.

Technical view

Versions before 0.010 fail to validate that random_bytes() length is non-negative. A negative value can wrap allocation sizing to zero while the OS randomness call receives a very large unsigned length, causing heap buffer overflow, memory corruption, and denial of service. CVSS is 7.5, availability-only.

Likely exposure

Exposure is mainly Perl applications using Crypt::SysRandom::XS before 0.010 and passing attacker-influenced values into random_bytes(). Applications using fixed, internal lengths are less likely to be exploitable based on the CVE description.

Exploitation context

No active exploitation is indicated in the provided sources, and the CVE is not listed as KEV. Exploitation requires a code path where an attacker can influence the length argument supplied to random_bytes(). The documented impact is application crash or denial of service.

Researcher notes

The root issue is improper validation of the length parameter in the XS binding, mapped to CWE-122 and CWE-1284. The CVE describes integer wraparound followed by oversized writes into a zero-byte allocation. Source evidence does not establish confidentiality or integrity impact, public exploitation, or affected downstream applications.

Mitigation direction

  • Inventory Perl dependencies for Crypt-SysRandom-XS usage and installed versions.
  • Upgrade Crypt::SysRandom::XS to version 0.010 or later per vendor release notes.
  • Review calls to random_bytes() and reject negative or untrusted length values.
  • Check MetaCPAN and upstream guidance for any additional vendor recommendations.

Validation and detection

  • Confirm installed Crypt-SysRandom-XS versions across production and build environments.
  • Search application code for random_bytes() calls using external or user-controlled length values.
  • Verify updated deployments no longer run versions before 0.010.
  • Review application logs for unexplained crashes in affected Perl services.
Prepared
Confidence
high
Sources
4

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-122: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cwe · low confidence lookup

CWE-1284: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2026-2597 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
7.5 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
3Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
7.5CVSS 3.1HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H3.93.6Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

7.5High
CVSS 3.1 vector shape for CVE-2026-2597Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
LEONTCrypt::SysRandom::XSCrypt-SysRandom-XS, 0unaffected
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-122 · source CWE mapping

Heap-based Buffer Overflow

Heap-based Buffer Overflow represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.

CWE-1284 · source CWE mapping

Improper Validation of Specified Quantity in Input

Improper Validation of Specified Quantity in Input represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.