CVE-2026-2474 Details
Description
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.
A heap buffer overflow vulnerability has been identified in the Crypt::URandom module for Perl, specifically in versions 0.41 prior to 0.55. The issue arises in the XS function crypt_urandom_getrandom(), where the length parameter is not properly validated. This lack of validation allows for negative values to be supplied, causing an integer wraparound that results in a zero-byte allocation. When the subsequent call to getrandom() is made with the original negative value, it is implicitly converted to a large unsigned value, typically SIZE_MAX. This can lead to writes beyond the allocated buffer, causing heap memory corruption and crashing the application, creating a denial-of-service condition. While the length argument is usually hardcoded by the caller, applications that pass untrusted input to this parameter may be vulnerable.
Users can upgrade to Crypt::URandom version 0.55 or later, where this vulnerability has been fixed.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Feb 17, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://metacpan.org/release/DDICK/Crypt-URandom-0.54/source/URandom.xs#L35-79 | CPANSec | Issue Tracking |
| https://metacpan.org/release/DDICK/Crypt-URandom-0.55/source/Changes | CPANSec | ProductRelease Notes |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-122 | Heap-based Buffer Overflow | CPANSec |
| CWE-1284 | Improper Validation of Specified Quantity in Input | CPANSec |
Affected Products
| Product | Versions |
|---|---|
| ddick crypt::urandom | >= 0.41, < 0.55 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | CPANSec |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Mar 4, 2026 | Initial Analysis | [email protected] |
| Feb 17, 2026 | CVE Modified | CISA-ADP |
| Feb 16, 2026 | New CVE Received | CPANSec |