CVE-2026-2597Crypt::SysRandom::XS versions before 0.010 for Perl is vulnerable to a heap buffer…
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.
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
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.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | libcrypt-sysrandom-xs-perl | Fix pending | UBUNTU-CVE-2026-2597 | |
| Ubuntu 26.04 | libcrypt-sysrandom-xs-perl | Under investigation | UBUNTU-CVE-2026-2597 | |
| Ubuntu 25.10 | libcrypt-sysrandom-xs-perl | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2026-2597 | |
| Debian 14 | libcrypt-sysrandom-xs-perl | Fixed | 0.011-1 | DEBIAN-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.
- LEONT Crypt::SysRandom::XS: affected: before 0.010; fixed in
0.010
Solution: Update to version 0.010 or later
Vendor advisories:
- https://metacpan.org/dist/Crypt-SysRandom-XS/changes (release-notes)
References
- https://metacpan.org/dist/Crypt-SysRandom-XS/changes
- https://metacpan.org/release/LEONT/Crypt-SysRandom-XS-0.011/source/lib/Crypt/SysRandom/XS.xs#L51-52
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.