CVEfocus › CVE database › CVE-2026-2597

CVE-2026-2597Crypt::SysRandom::XS versions before 0.010 for Perl is vulnerable to a heap buffer…

CVSS 7.5 HighEPSS 0.6% (higher than 44% of CVEs)Published 2026-02-26Updated 2026-02-27Assigner: CPANSec

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.

CWE-122CWE-1284

What to do

Fixed builds are available from Debian: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

1Fixed
1Fix pending
1Under investigation
1Will not fix

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10libcrypt-sysrandom-xs-perlFix pendingUBUNTU-CVE-2026-2597
Ubuntu 26.04libcrypt-sysrandom-xs-perlUnder investigationUBUNTU-CVE-2026-2597
Ubuntu 25.10libcrypt-sysrandom-xs-perlWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2026-2597
Debian 14libcrypt-sysrandom-xs-perlFixed0.011-1DEBIAN-CVE-2026-2597

What the vendor says

As published in the CVE record by CPANSec, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Solution: Update to version 0.010 or later

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.