CVE-2026-40199Net::CIDR::Lite versions before 0.23 for Perl mishandles IPv4 mapped IPv6 addresses,…
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.
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-40199 |
| Ubuntu 25.10 | libnet-cidr-lite-perl | Fixed | 0.22-2ubuntu0.25.10.1 | UBUNTU-CVE-2026-40199 |
| Ubuntu 24.04 | libnet-cidr-lite-perl | Fixed | 0.22-2ubuntu0.24.04.1 | UBUNTU-CVE-2026-40199 |
| Ubuntu 22.04 | libnet-cidr-lite-perl | Fixed | 0.22-1ubuntu0.1 | UBUNTU-CVE-2026-40199 |
| Ubuntu 20.04 | libnet-cidr-lite-perl | Fix pending | 0.21-2ubuntu0.1+esm1 (Ubuntu Pro) | UBUNTU-CVE-2026-40199 |
| Ubuntu 18.04 | libnet-cidr-lite-perl | Fix pending | 0.21-1ubuntu0.18.04.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2026-40199 |
| Ubuntu 16.04 | libnet-cidr-lite-perl | Fix pending | 0.21-1ubuntu0.16.04.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2026-40199 |
| Debian 14 | libnet-cidr-lite-perl | Fixed | 0.22-3 | DEBIAN-CVE-2026-40199 |
| Debian 13 | libnet-cidr-lite-perl | Fixed | 0.22-3~deb13u1 | DEBIAN-CVE-2026-40199 |
| Debian 12 | libnet-cidr-lite-perl | Fixed | 0.22-3~deb12u1 | DEBIAN-CVE-2026-40199 |
| Alpine Linux 3.24 | perl-net-cidr-lite | Fixed | 0.23-r0 | ALPINE-CVE-2026-40199 |
| Alpine Linux 3.23 | perl-net-cidr-lite | Fixed | 0.23-r0 | ALPINE-CVE-2026-40199 |
| Alpine Linux 3.22 | perl-net-cidr-lite | Fixed | 0.23-r0 | ALPINE-CVE-2026-40199 |
| Alpine Linux 3.21 | perl-net-cidr-lite | Fixed | 0.23-r0 | ALPINE-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.
- 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/b7166b1fa17b3b14b4c795ace5b3fbf71a0bd04a.… (patch)
- https://metacpan.org/release/STIGTSP/Net-CIDR-Lite-0.23/changes (release-notes)
References
- https://github.com/stigtsp/Net-CIDR-Lite/commit/b7166b1fa17b3b14b4c795ace5b3fbf71a0bd04a.patch
- https://metacpan.org/release/STIGTSP/Net-CIDR-Lite-0.23/changes
- https://www.cve.org/CVERecord?id=CVE-2026-40198
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.