CVE-2026-40198Net::CIDR::Lite versions before 0.23 for Perl does not validate IPv6 group count, which…
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.
What to do
Fixed builds are available from Alpine, Debian, Ubuntu: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.04 | libnet-cidr-lite-perl | Fixed | 0.22-2ubuntu0.26.04.1 | UBUNTU-CVE-2026-40198 |
| Ubuntu 25.10 | libnet-cidr-lite-perl | Fixed | 0.22-2ubuntu0.25.10.1 | UBUNTU-CVE-2026-40198 |
| Ubuntu 24.04 | libnet-cidr-lite-perl | Fixed | 0.22-2ubuntu0.24.04.1 | UBUNTU-CVE-2026-40198 |
| Ubuntu 22.04 | libnet-cidr-lite-perl | Fixed | 0.22-1ubuntu0.1 | UBUNTU-CVE-2026-40198 |
| Ubuntu 20.04 | libnet-cidr-lite-perl | Fix pending | 0.21-2ubuntu0.1+esm1 (Ubuntu Pro) | UBUNTU-CVE-2026-40198 |
| Ubuntu 18.04 | libnet-cidr-lite-perl | Fix pending | 0.21-1ubuntu0.18.04.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2026-40198 |
| Ubuntu 16.04 | libnet-cidr-lite-perl | Fix pending | 0.21-1ubuntu0.16.04.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2026-40198 |
| Debian 14 | libnet-cidr-lite-perl | Fixed | 0.22-3 | DEBIAN-CVE-2026-40198 |
| Debian 13 | libnet-cidr-lite-perl | Fixed | 0.22-3~deb13u1 | DEBIAN-CVE-2026-40198 |
| Debian 12 | libnet-cidr-lite-perl | Fixed | 0.22-3~deb12u1 | DEBIAN-CVE-2026-40198 |
| Alpine Linux 3.24 | perl-net-cidr-lite | Fixed | 0.23-r0 | ALPINE-CVE-2026-40198 |
| Alpine Linux 3.23 | perl-net-cidr-lite | Fixed | 0.23-r0 | ALPINE-CVE-2026-40198 |
| Alpine Linux 3.22 | perl-net-cidr-lite | Fixed | 0.23-r0 | ALPINE-CVE-2026-40198 |
| Alpine Linux 3.21 | perl-net-cidr-lite | Fixed | 0.23-r0 | ALPINE-CVE-2026-40198 |
What the vendor says
As published in the CVE record by CPANSec, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- STIGTSP Net::CIDR::Lite: affected: before 0.23; fixed in
0.23
Solution: Upgrade to version 0.23 or newer, or apply the patch provided.
Vendor advisories:
- https://github.com/stigtsp/Net-CIDR-Lite/commit/25d65f85dbe4885959a10471725ec9d250a589c3.… (patch)
- https://metacpan.org/release/STIGTSP/Net-CIDR-Lite-0.23/changes (release-notes)
References
- https://github.com/stigtsp/Net-CIDR-Lite/commit/25d65f85dbe4885959a10471725ec9d250a589c3.patch
- https://metacpan.org/release/STIGTSP/Net-CIDR-Lite-0.23/changes
- https://www.cve.org/CVERecord?id=CVE-2026-40199
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.