CPANSA-Crypt-URandom-2026-2474: Crypt-URandom vulnerability
| Publisher | giterlizzi | Document category | csaf_security_advisory |
|---|---|---|---|
| Initial release date | 2026-02-16T00:00:00 | Engine | CSAF Perl Toolkit 0.26 |
| Current release date | 2026-02-16T00:00:00 | Build Date | |
| Current version | 1 | Status | final |
| CVSS v3.1 Base Score | 7.5 | Severity | |
| Original language | Language | en | |
| Also referred to | |||
Vulnerability 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.
Vulnerabilities
CVE-2026-2474
Vulnerability DescriptionCrypt::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.
| Weakness | CWE-122 : Heap-based Buffer Overflow |
|---|
Product status
Known affected
| Product | Score | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Crypt-URandom greater than or equal 0.41 and less than 0.55 |
|
Fixed
- Crypt-URandom greater than or equal 0.55
giterlizzi
Namespace: https://github.com/giterlizzi/
gdt@cpan.org
References
- CPANSA-Crypt-URandom-2026-2474 JSON self
https://raw.githubusercontent.com/giterlizzi/perl-CPANSA-CSAF/develop/csaf/white/2026/cpansa-crypt-urandom-2026-2474.json - https://metacpan.org/release/DDICK/Crypt-URandom-0.54/source/URandom.xs#L35-79 external
https://metacpan.org/release/DDICK/Crypt-URandom-0.54/source/URandom.xs#L35-79 - https://metacpan.org/release/DDICK/Crypt-URandom-0.55/source/Changes external
https://metacpan.org/release/DDICK/Crypt-URandom-0.55/source/Changes - CVE-2026-2474 (NVD) external
https://nvd.nist.gov/vuln/detail/CVE-2026-2474
Revision history
| Version | Date of the revision | Summary of the revision |
|---|---|---|
| 1 | Mon Feb 16 00:00:00 2026 | First release |
Sharing rules
TLP:WHITE
For the TLP version see: https://www.first.org/tlp/