CVEfocus › CVE database › CVE-2026-40198

CVE-2026-40198Net::CIDR::Lite versions before 0.23 for Perl does not validate IPv6 group count, which…

CVSS 7.5 HighEPSS 0.5% (higher than 38% of CVEs)Published 2026-04-10Updated 2026-04-13Assigner: CPANSec

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.

CWE-1286

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

11Fixed
3Fix pending

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.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04libnet-cidr-lite-perlFixed0.22-2ubuntu0.26.04.1UBUNTU-CVE-2026-40198
Ubuntu 25.10libnet-cidr-lite-perlFixed0.22-2ubuntu0.25.10.1UBUNTU-CVE-2026-40198
Ubuntu 24.04libnet-cidr-lite-perlFixed0.22-2ubuntu0.24.04.1UBUNTU-CVE-2026-40198
Ubuntu 22.04libnet-cidr-lite-perlFixed0.22-1ubuntu0.1UBUNTU-CVE-2026-40198
Ubuntu 20.04libnet-cidr-lite-perlFix pending0.21-2ubuntu0.1+esm1 (Ubuntu Pro)UBUNTU-CVE-2026-40198
Ubuntu 18.04libnet-cidr-lite-perlFix pending0.21-1ubuntu0.18.04.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2026-40198
Ubuntu 16.04libnet-cidr-lite-perlFix pending0.21-1ubuntu0.16.04.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2026-40198
Debian 14libnet-cidr-lite-perlFixed0.22-3DEBIAN-CVE-2026-40198
Debian 13libnet-cidr-lite-perlFixed0.22-3~deb13u1DEBIAN-CVE-2026-40198
Debian 12libnet-cidr-lite-perlFixed0.22-3~deb12u1DEBIAN-CVE-2026-40198
Alpine Linux 3.24perl-net-cidr-liteFixed0.23-r0ALPINE-CVE-2026-40198
Alpine Linux 3.23perl-net-cidr-liteFixed0.23-r0ALPINE-CVE-2026-40198
Alpine Linux 3.22perl-net-cidr-liteFixed0.23-r0ALPINE-CVE-2026-40198
Alpine Linux 3.21perl-net-cidr-liteFixed0.23-r0ALPINE-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.

Solution: Upgrade to version 0.23 or newer, or apply the patch provided.

Vendor advisories:

References

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.