Skip to content
OpenAdvisories
Medium · 6.5 CVE-2026-40199 EUVD-2026-21611GHSA-932w-96j4-j35v

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

Published Apr 10, 2026 · Updated Apr 13, 2026 · Assigned by CPANSec

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 products

VendorProductAffectedFixed
STIGTSP Net::CIDR::Lite < 0.23 0.23

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 libnet-cidr-lite-perl 0.22-3 —
Debian 13 libnet-cidr-lite-perl 0.22-3~deb13u1 —
Debian 12 libnet-cidr-lite-perl 0.22-3~deb12u1 —
ReleasePackageFixed inAdvisory
Ubuntu 26.04 LTS libnet-cidr-lite-perl 0.22-2ubuntu0.26.04.1 USN-8406-1
Ubuntu 25.10 libnet-cidr-lite-perl 0.22-2ubuntu0.25.10.1 USN-8406-1
Ubuntu 24.04 LTS libnet-cidr-lite-perl 0.22-2ubuntu0.24.04.1 USN-8406-1
Ubuntu 22.04 LTS libnet-cidr-lite-perl 0.22-1ubuntu0.1 USN-8406-1
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 20.04 LTS libnet-cidr-lite-perl 0.21-2ubuntu0.1+esm1 USN-8406-1
Ubuntu Pro 18.04 LTS libnet-cidr-lite-perl 0.21-1ubuntu0.18.04.1~esm1 USN-8406-1
Ubuntu Pro 16.04 LTS libnet-cidr-lite-perl 0.21-1ubuntu0.16.04.1~esm1 USN-8406-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed perl-Net-CIDR-Lite 0.240.0-1.1 openSUSE-SU-2026:10780-1
ReleasePackageFixed inAdvisory
Alpine v3.24 perl-net-cidr-lite 0.23-r0 —
Alpine v3.23 perl-net-cidr-lite 0.23-r0 —
Alpine v3.22 perl-net-cidr-lite 0.23-r0 —
Alpine v3.21 perl-net-cidr-lite 0.23-r0 —

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 perl-Net-CIDR-Lite 0.22-8.amzn2023.0.1 ALAS2023-2026-1624

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 perl-Net-CIDR-Lite No fix yet —

Advisories 3

References