CVE-2026-40198 Details
Description
Net::CIDR::Lite versions before 0.23 for Perl does not validate IPv6 group count, which may allow IP ACL bypass. _pack_ipv6() does not check that uncompressed IPv6 addresses (without ::) have exactly 8 hex groups. Inputs like "abcd", "1:2:3", or "1:2:3:4:5:6:7" are accepted and produce packed values of wrong length (3, 7, or 15 bytes instead of 17). The packed values are used internally for mask and comparison operations. find() and bin_find() use Perl string comparison (lt/gt) on these values, and comparing strings of different lengths gives wrong results. This can cause find() to incorrectly report an address as inside or outside a range. Example: my $cidr = Net::CIDR::Lite->new("::/8"); $cidr->find("1:2:3"); # invalid input, incorrectly returns true This is the same class of input validation issue as CVE-2021-47154 (IPv4 leading zeros) previously fixed in this module. See also CVE-2026-40199, a related issue in the same function affecting IPv4 mapped IPv6 addresses.
A vulnerability exists in Net::CIDR::Lite for Perl, specifically in versions prior to 0.23, due to improper validation of uncompressed IPv6 addresses. The function '_pack_ipv6()' accepts invalid inputs that lack the required eight hex groups, such as 'abcd', '1:2:3', or '1:2:3:4:5:6:7'. This flaw leads to incorrect packed values of varying lengths, which disrupts internal mask and comparison operations. The 'find()' and 'bin_find()' methods, which rely on Perl's string comparison, can produce erroneous results by misreporting whether an address falls within a range. This issue is similar to a previously addressed vulnerability regarding IPv4 addresses with leading zeros.
Users are advised to update to Net::CIDR::Lite version 0.23 or later, where this vulnerability has been addressed.
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 Apr 13, 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://github.com/stigtsp/Net-CIDR-Lite/commit/25d65f85dbe4885959a10471725ec9d250a589c3.patch | CPANSec | Patch |
| https://metacpan.org/release/STIGTSP/Net-CIDR-Lite-0.23/changes | CPANSec | Release Notes |
| https://www.cve.org/CVERecord?id=CVE-2026-40199 | CPANSec | Third Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-1286 | Improper Validation of Syntactic Correctness of Input | CPANSec |
Affected Products
| Product | Versions |
|---|---|
| stigtsp net::cidr::lite | < 0.23 |
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 |
| Apr 21, 2026 | Initial Analysis | [email protected] |
| Apr 13, 2026 | CVE Modified | CISA-ADP |
| Apr 10, 2026 | New CVE Received | CPANSec |