Vulnerability · Published Apr 10, 2026 · Assigned by CPANSec

CVE-2026-40199Net::CIDR::Lite versions before 0.23 for Perl mishandles IPv4 mapped IPv6 addresses, which may allow IP ACL bypass

Medium 6.5

In plain English

A medium-severity security flaw in Net::CIDR::Lite from STIGTSP. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 24% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)6.5Medium
Exploit odds (30 days)0.3%top 76.4% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Alpine:v3.21perl-net-cidr-lite0.23-r0ALPINE-CVE-2026-40199
Alpine:v3.22perl-net-cidr-lite0.23-r0ALPINE-CVE-2026-40199
Alpine:v3.23perl-net-cidr-lite0.23-r0ALPINE-CVE-2026-40199
Alpine:v3.24perl-net-cidr-lite0.23-r0ALPINE-CVE-2026-40199
Debian:12libnet-cidr-lite-perl0.22-3~deb12u1DEBIAN-CVE-2026-40199
Debian:13libnet-cidr-lite-perl0.22-3~deb13u1DEBIAN-CVE-2026-40199
Debian:14libnet-cidr-lite-perl0.22-3DEBIAN-CVE-2026-40199
Ubuntu:22.04:LTSlibnet-cidr-lite-perl0.22-1ubuntu0.1USN-8406-1
Ubuntu:22.04:LTSlibnet-cidr-lite-perl0.22-1ubuntu0.1UBUNTU-CVE-2026-40199
Ubuntu:24.04:LTSlibnet-cidr-lite-perl0.22-2ubuntu0.24.04.1USN-8406-1
Ubuntu:24.04:LTSlibnet-cidr-lite-perl0.22-2ubuntu0.24.04.1UBUNTU-CVE-2026-40199
Ubuntu:25.10libnet-cidr-lite-perl0.22-2ubuntu0.25.10.1USN-8406-1
Ubuntu:25.10libnet-cidr-lite-perl0.22-2ubuntu0.25.10.1UBUNTU-CVE-2026-40199
Ubuntu:26.04:LTSlibnet-cidr-lite-perl0.22-2ubuntu0.26.04.1UBUNTU-CVE-2026-40199
Ubuntu:26.04:LTSlibnet-cidr-lite-perl0.22-2ubuntu0.26.04.1USN-8406-1

Affected products (as reported)

VendorProductVersions
STIGTSP Net::CIDR::Lite 0 – before 0.23

Weakness: CWE-130 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

References