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

CVE-2026-40199 is fixed in 2 products on 1 platform, first by libnet-cidr-lite-perl 0.21-1ubuntu0.18.04.1~esm1, released April 10, 2026. It is not reported as exploited. Patch Radar priority: Routine.

- Web page: https://patchblox.com/security/cve/CVE-2026-40199
- Priority: Routine
- CVSS: 6.5 (medium)
- EPSS: 0.0031
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Apr 10, 2026

## 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.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | libnet-cidr-lite-perl Debian 12.15 (bookworm) | 0.22-3~deb12u1 | [DEBIAN-CVE-2026-40199](https://patchblox.com/security/data/fix/linux/debian-cve-2026-40199.md) | Apr 10, 2026 |
| Linux | libnet-cidr-lite-perl Debian 13.5 (trixie) | 0.22-3~deb13u1 | [DEBIAN-CVE-2026-40199](https://patchblox.com/security/data/fix/linux/debian-cve-2026-40199.md) | Apr 10, 2026 |
| Linux | libnet-cidr-lite-perl Debian 14 | 0.22-3 | [DEBIAN-CVE-2026-40199](https://patchblox.com/security/data/fix/linux/debian-cve-2026-40199.md) | Apr 10, 2026 |
| Linux | libnet-cidr-lite-perl Ubuntu 18.04.6 LTS (bionic) | 0.21-1ubuntu0.18.04.1~esm1 | [libnet-cidr-lite-perl 0.21-1ubuntu0.18.04.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-libnet-cidr-lite-perl-0.21-1ubuntu0.18.04.1-esm1.md) | Apr 10, 2026 |
| Linux | libnet-cidr-lite-perl Ubuntu 20.04 LTS (focal) | 0.21-2ubuntu0.1+esm1 | [libnet-cidr-lite-perl 0.21-2ubuntu0.1+esm1](https://patchblox.com/security/data/fix/linux/ubuntu-focal-libnet-cidr-lite-perl-0.21-2ubuntu0.1-esm1.md) | Apr 10, 2026 |
| Linux | libnet-cidr-lite-perl Ubuntu 22.04.1 LTS (jammy) | 0.22-1ubuntu0.1 | [libnet-cidr-lite-perl 0.22-1ubuntu0.1](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-libnet-cidr-lite-perl-0.22-1ubuntu0.1.md) | Apr 10, 2026 |
| Linux | libnet-cidr-lite-perl Ubuntu 24.04.5 LTS (noble) | 0.22-2ubuntu0.24.04.1 | [libnet-cidr-lite-perl 0.22-2ubuntu0.24.04.1](https://patchblox.com/security/data/fix/linux/ubuntu-noble-libnet-cidr-lite-perl-0.22-2ubuntu0.24.04.1.md) | Apr 10, 2026 |
| Linux | libnet-cidr-lite-perl Ubuntu 25.10 (questing) | 0.22-2ubuntu0.25.10.1 | [libnet-cidr-lite-perl 0.22-2ubuntu0.25.10.1](https://patchblox.com/security/data/fix/linux/ubuntu-questing-libnet-cidr-lite-perl-0.22-2ubuntu0.25.10.1.md) | Apr 10, 2026 |
| Linux | libnet-cidr-lite-perl Ubuntu 26.04.1 LTS (resolute) | 0.22-2ubuntu0.26.04.1 | [libnet-cidr-lite-perl 0.22-2ubuntu0.26.04.1](https://patchblox.com/security/data/fix/linux/ubuntu-resolute-libnet-cidr-lite-perl-0.22-2ubuntu0.26.04.1.md) | Apr 10, 2026 |
| Linux | perl-Net-CIDR-Lite amzn 2023 | 0.22-8.amzn2023.0.1 | [ALAS2023-2026-1624](https://patchblox.com/security/data/fix/linux/alas2023-2026-1624.md) | Apr 27, 2026 |

---

Data as of 2026-11-08T06:59:42Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
