CVEfocus › CVE database › CVE-2026-40199

CVE-2026-40199Net::CIDR::Lite versions before 0.23 for Perl mishandles IPv4 mapped IPv6 addresses,…

CVSS 6.5 MediumEPSS 0.4% (higher than 27% of CVEs)Published 2026-04-10Updated 2026-04-13Assigner: CPANSec

Net::CIDR::Lite versions before 0.23 for Perl mishandles IPv4 mapped IPv6 addresses, which may allow IP ACL bypass. _pack_ipv6() includes the sentinel byte from _pack_ipv4() when building the packed representation of IPv4 mapped addresses like ::ffff:192.168.1.1. This produces an 18 byte value instead of 17 bytes, misaligning the IPv4 part of the address. The wrong length causes incorrect results in mask operations (bitwise AND truncates to the shorter operand) and in find() / bin_find() which use Perl string comparison (lt/gt). This can cause find() to incorrectly match or miss addresses. Example: my $cidr = Net::CIDR::Lite->new("::ffff:192.168.1.0/120"); $cidr->find("::ffff:192.168.2.0"); # incorrectly returns true This is triggered by valid RFC 4291 IPv4 mapped addresses (::ffff:x.x.x.x). See also CVE-2026-40198, a related issue in the same function affecting malformed IPv6 addresses.

CWE-130

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

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.