CVEfocus › CVE database › CVE-2026-2474

CVE-2026-2474Crypt::URandom versions from 0.41 before 0.55 for Perl is vulnerable to a heap buffer…

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

Crypt::URandom versions from 0.41 before 0.55 for Perl is vulnerable to a heap buffer overflow in the XS function crypt_urandom_getrandom(). 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 getrandom(data, length, GRND_NONBLOCK) 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 Alpine, Debian: see the table below for the fixed version per release.

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

3Fixed
1Will not fix
3Not affected

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.04libcrypt-urandom-perlNot affected
vulnerable_code_not_present
Ubuntu 25.10libcrypt-urandom-perlWill not fix
The getrandom subroutine was introduced in 0.41
UBUNTU-CVE-2026-2474
Ubuntu 24.04libcrypt-urandom-perlNot affected
vulnerable_code_not_present
Ubuntu 22.04libcrypt-urandom-perlNot affected
vulnerable_code_not_present
Debian 14libcrypt-urandom-perlFixed0.55-1DEBIAN-CVE-2026-2474
Debian 13libcrypt-urandom-perlFixed0.54-1+deb13u1DEBIAN-CVE-2026-2474
Alpine Linux 3.24perl-crypt-urandomFixed0.55-r0ALPINE-CVE-2026-2474

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.55 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.