CVE-2026-2474: CWE-122 Heap-based Buffer Overflow in DDICK Crypt::URandom
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.
AI Analysis
Technical Summary
CVE-2026-2474 identifies a heap-based buffer overflow vulnerability in the Perl module Crypt::URandom, specifically in versions from 0.41 before 0.55. The vulnerability exists in the XS function crypt_urandom_getrandom(), which is responsible for generating random bytes. The function accepts a length parameter that is expected to be non-negative. However, it does not validate this parameter properly. If a negative value such as -1 is passed, the expression length + 1u causes an integer wraparound due to unsigned integer arithmetic, resulting in a zero-byte allocation for the buffer. Subsequently, the getrandom() system call is invoked with the original negative length value, which is implicitly converted to a very large unsigned integer (typically SIZE_MAX). This leads to writes beyond the allocated buffer, causing heap memory corruption and potentially crashing the application, resulting in a denial of service condition. While the vulnerability could theoretically allow memory corruption, exploitation is limited because the length parameter is often hardcoded by developers, reducing the chance of attacker-controlled input. However, applications that pass untrusted or user-supplied input to this parameter are vulnerable. No public exploits or active exploitation have been reported to date. The vulnerability is classified under CWE-122 (Heap-based Buffer Overflow) and CWE-1284 (Improper Validation of Array Index or Pointer Offset). No CVSS score has been assigned yet. The vulnerability was published on February 16, 2026, and affects the DDICK Crypt::URandom Perl module, a component used for cryptographically secure random number generation in Perl applications.
Potential Impact
For European organizations, the primary impact of CVE-2026-2474 is the risk of denial of service through application crashes caused by heap memory corruption. This could disrupt services relying on Perl applications that use the vulnerable Crypt::URandom module, particularly if those applications accept untrusted input for the length parameter. While the vulnerability does not directly enable remote code execution or data leakage, heap corruption could potentially be leveraged in complex attack chains, increasing risk in sensitive environments. Organizations in sectors such as finance, telecommunications, and critical infrastructure that use Perl-based software for cryptographic operations or random number generation may experience service outages or degraded reliability. The absence of known exploits reduces immediate risk, but the vulnerability's presence in open-source Perl modules means that attackers could develop exploits if untrusted input usage is common. Additionally, denial of service attacks could be used as part of larger multi-vector attacks targeting European organizations. The impact is heightened in environments where high availability and cryptographic integrity are critical.
Mitigation Recommendations
To mitigate CVE-2026-2474, European organizations should first identify all instances of Crypt::URandom versions 0.41 up to but not including 0.55 in their environments. Since no patch links are currently available, organizations should monitor vendor and community updates for a fixed version and apply it promptly once released. In the interim, developers should audit all code invoking crypt_urandom_getrandom() to ensure the length parameter is never derived from untrusted or user-controlled input. Implement strict input validation to reject negative or out-of-range values before passing them to the function. Consider adding additional runtime checks or wrappers around the vulnerable function to enforce parameter constraints. For critical systems, consider isolating or sandboxing Perl applications using this module to limit the impact of potential crashes. Regularly review application logs and monitor for abnormal crashes or memory corruption symptoms that could indicate exploitation attempts. Finally, incorporate this vulnerability into vulnerability management and incident response plans to ensure rapid detection and remediation.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Poland, Italy
CVE-2026-2474: CWE-122 Heap-based Buffer Overflow in DDICK Crypt::URandom
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.
AI-Powered Analysis
Technical Analysis
CVE-2026-2474 identifies a heap-based buffer overflow vulnerability in the Perl module Crypt::URandom, specifically in versions from 0.41 before 0.55. The vulnerability exists in the XS function crypt_urandom_getrandom(), which is responsible for generating random bytes. The function accepts a length parameter that is expected to be non-negative. However, it does not validate this parameter properly. If a negative value such as -1 is passed, the expression length + 1u causes an integer wraparound due to unsigned integer arithmetic, resulting in a zero-byte allocation for the buffer. Subsequently, the getrandom() system call is invoked with the original negative length value, which is implicitly converted to a very large unsigned integer (typically SIZE_MAX). This leads to writes beyond the allocated buffer, causing heap memory corruption and potentially crashing the application, resulting in a denial of service condition. While the vulnerability could theoretically allow memory corruption, exploitation is limited because the length parameter is often hardcoded by developers, reducing the chance of attacker-controlled input. However, applications that pass untrusted or user-supplied input to this parameter are vulnerable. No public exploits or active exploitation have been reported to date. The vulnerability is classified under CWE-122 (Heap-based Buffer Overflow) and CWE-1284 (Improper Validation of Array Index or Pointer Offset). No CVSS score has been assigned yet. The vulnerability was published on February 16, 2026, and affects the DDICK Crypt::URandom Perl module, a component used for cryptographically secure random number generation in Perl applications.
Potential Impact
For European organizations, the primary impact of CVE-2026-2474 is the risk of denial of service through application crashes caused by heap memory corruption. This could disrupt services relying on Perl applications that use the vulnerable Crypt::URandom module, particularly if those applications accept untrusted input for the length parameter. While the vulnerability does not directly enable remote code execution or data leakage, heap corruption could potentially be leveraged in complex attack chains, increasing risk in sensitive environments. Organizations in sectors such as finance, telecommunications, and critical infrastructure that use Perl-based software for cryptographic operations or random number generation may experience service outages or degraded reliability. The absence of known exploits reduces immediate risk, but the vulnerability's presence in open-source Perl modules means that attackers could develop exploits if untrusted input usage is common. Additionally, denial of service attacks could be used as part of larger multi-vector attacks targeting European organizations. The impact is heightened in environments where high availability and cryptographic integrity are critical.
Mitigation Recommendations
To mitigate CVE-2026-2474, European organizations should first identify all instances of Crypt::URandom versions 0.41 up to but not including 0.55 in their environments. Since no patch links are currently available, organizations should monitor vendor and community updates for a fixed version and apply it promptly once released. In the interim, developers should audit all code invoking crypt_urandom_getrandom() to ensure the length parameter is never derived from untrusted or user-controlled input. Implement strict input validation to reject negative or out-of-range values before passing them to the function. Consider adding additional runtime checks or wrappers around the vulnerable function to enforce parameter constraints. For critical systems, consider isolating or sandboxing Perl applications using this module to limit the impact of potential crashes. Regularly review application logs and monitor for abnormal crashes or memory corruption symptoms that could indicate exploitation attempts. Finally, incorporate this vulnerability into vulnerability management and incident response plans to ensure rapid detection and remediation.
Affected Countries
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- CPANSec
- Date Reserved
- 2026-02-13T15:45:19.206Z
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 6994257080d747be207b7278
Added to database: 2/17/2026, 8:23:12 AM
Last enriched: 2/17/2026, 8:23:41 AM
Last updated: 2/21/2026, 12:16:42 AM
Views: 22
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2026-27203: CWE-15: External Control of System or Configuration Setting in YosefHayim ebay-mcp
HighCVE-2026-27168: CWE-122: Heap-based Buffer Overflow in HappySeaFox sail
HighCVE-2026-27134: CWE-287: Improper Authentication in strimzi strimzi-kafka-operator
HighCVE-2026-27190: CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in denoland deno
HighCVE-2026-27026: CWE-770: Allocation of Resources Without Limits or Throttling in py-pdf pypdf
MediumActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.