Sceawere
Vulnerability Detail
CVE-2026-19566UPDATED Verified Sceawere Triage Sources: NVD / CISA KEV
Net::CIDR::Set Memory Exhaustion Vulnerability
Vulnerability Metadata
- Severity
- High
- Score / CVSS
- 7.5
- Creation Date
- 13h ago
- Vendor
- RRWO
- Product
- Net::CIDR::Set
- Attack Type
- CWE-1284 Improper Validation of Specified Quantity in Input
- Vector String
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Attack Complexity
- LOW
Narrative and Response
Description
Net::CIDR::Set versions before 0.23 for Perl allow memory exhaustion and malformed set ranges via unbounded IPv6 prefix lengths. The _encode method accepts any prefix length matching `(0|[1-9][0-9]*)` and passes it to _width2bits(), which builds the mask as `'1' x ($width + 8)`, one character per bit. The _inc() method then unpacks the packed mask into a Perl array of one scalar per byte, so the prefix length alone sets the allocation size: `::/100000000` builds a 100 MB string and a 12.5 million element array. The value being tested is parsed, not just the configured ranges: contains() builds a set from its argument, and _guess_coder() tries the IPv4 coder and then the IPv6 coder, so an IPv4-only set expands an oversized IPv6 prefix length before the mixed address width check rejects it. Any caller that passes untrusted input to contains() or add() can exhaust process memory. A prefix length above 128 is also stored as a range that does not match the requested block: 2001:db8::/129 stringifies back unchanged, contains() of its own base address returns false, and removing it from a set drops the base address while the set still prints as covering it.
Executive Summary
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Technical Details
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Mitigations
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
References
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Additional Metadata
{
"score": "7.5",
"pubDate": "2026-08-12T09:17:29.753Z",
"pubdate": "2026-08-12T09:17:29.753Z",
"executiveSummary": "Net::CIDR::Set versions before 0.23 contain a memory exhaustion vulnerability caused by unbounded IPv6 prefix lengths in the _encode method. The vulnerability allows an attacker to cause excessive memory consumption and process crashes through malformed set ranges.\nThe vulnerability affects Net::CIDR::Set versions prior to 0.23 for Perl. Risk implications include Denial of Service (DoS) via resource exhaustion, impacting any application processing untrusted network addresses or CIDR blocks.\nAn attacker with the capability to supply untrusted input to methods such as contains() or add() can trigger the flaw without authentication or special privileges. Exploitation requires passing an oversized IPv6 prefix length to trigger the underlying memory allocation failure.",
"technicalDetails": "The vulnerability resides in the _encode and _inc methods of Net::CIDR::Set, specifically within the handling of IPv6 prefix lengths. The _encode method accepts any prefix length matching the regular expression (0|[1-9][0-9]*) without validation against the maximum valid IPv6 bit length of 128. This value is subsequently passed to _width2bits(), which constructs a bitmask string using the expression '1' x ($width + 8), resulting in one character per bit.\nFollowing string creation, the _inc() method unpacks the packed mask into a Perl array containing one scalar per bit or byte, meaning that the user-supplied prefix length directly dictates the memory allocation size. For example, a crafted prefix length such as ::/100000000 forces the allocation of a 100 MB string and a 12.5 million element array.\nThe attack flow initiates when an untrusted input is passed to methods like contains() or add(). When contains() is invoked, it attempts to build a set from the argument. Furthermore, _guess_coder() evaluates the IPv4 coder before falling back to the IPv6 coder, causing an IPv4-only set to expand an oversized IPv6 prefix length before mixed address width checks can reject it.\nIn addition to memory exhaustion, prefix lengths exceeding 128 are stored as invalid ranges that fail to match the requested blocks. Consequently, a block such as 2001:db8::/129 stringifies back unchanged, contains() invoked on its own base address evaluates to false, and removing the range from a set drops the base address while the set continues to output representation indicating it is still covered.\nPrerequisites for exploitation include network exposure where untrusted input is processed by the library. No authentication or elevated privileges are required, provided the vulnerable functions accept external input."
}