Skip to content
Heist/ feed
Back to feed
MediumFix available

libnet-cidr-lite-perl — security advisory

Type: advisorySources: OSVAdvisory ID: DEBIAN-CVE-2026-40199

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.

Products
libnet-cidr-lite-perl
Affected versions
0.22-2, 0.22-3~deb12u1, 0.22-3~deb12u2, 0.22-3~deb13u1, 0.22-3~deb13u2
Fixed versions
0.22-3, 0.22-3~deb12u1, 0.22-3~deb13u1
CVEs
CVE-2026-40199
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 17:36 UTC · Revision 2

Source evidence

DEBIAN-CVE-2026-40199

core-osv · Original source

Published 10 Apr 2026, 22:16 UTC

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.

osv:DEBIAN-CVE-2026-40199

libnet-cidr-lite-perl

Fixed versions: 0.22-3~deb12u1

libnet-cidr-lite-perl

Fixed versions: 0.22-3~deb13u1

libnet-cidr-lite-perl

Fixed versions: 0.22-3

Complete source record
{
  "id": "33bb395d0ba8de7517598cca8ffd1b6037c8351f5313c256aa9448062fcf21de",
  "url": "https://osv.dev/vulnerability/DEBIAN-CVE-2026-40199",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "DEBIAN-CVE-2026-40199",
    "summary": "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.",
    "evidence": "osv:DEBIAN-CVE-2026-40199",
    "products": [
      {
        "name": {
          "value": "libnet-cidr-lite-perl",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "0.22-3~deb12u1",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": [
          {
            "value": "0.22-2",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "libnet-cidr-lite-perl",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "0.22-3~deb13u1",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": [
          {
            "value": "0.22-2",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "0.22-3~deb12u1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "0.22-3~deb12u2",
            "evidence": "/affected/1/versions"
          }
        ]
      },
      {
        "name": {
          "value": "libnet-cidr-lite-perl",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "0.22-3",
            "evidence": "/affected/2/ranges"
          }
        ],
        "affected_versions": [
          {
            "value": "0.22-2",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "0.22-3~deb12u1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "0.22-3~deb12u2",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "0.22-3~deb13u1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "0.22-3~deb13u2",
            "evidence": "/affected/2/versions"
          }
        ]
      }
    ],
    "severity": "medium",
    "structured": {
      "id": "DEBIAN-CVE-2026-40199",
      "aliases": [
        "DEBIAN-CVE-2026-40199"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "0.22-3~deb12u1"
                }
              ]
            }
          ],
          "package": {
            "name": "libnet-cidr-lite-perl",
            "purl": "pkg:deb/debian/libnet-cidr-lite-perl?arch=source&distro=bookworm",
            "ecosystem": "Debian:12"
          },
          "versions": [
            "0.22-2"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-40199.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "0.22-3~deb13u1"
                }
              ]
            }
          ],
          "package": {
            "name": "libnet-cidr-lite-perl",
            "purl": "pkg:deb/debian/libnet-cidr-lite-perl?arch=source&distro=trixie",
            "ecosystem": "Debian:13"
          },
          "versions": [
            "0.22-2",
            "0.22-3~deb12u1",
            "0.22-3~deb12u2"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-40199.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "0.22-3"
                }
              ]
            }
          ],
          "package": {
            "name": "libnet-cidr-lite-perl",
            "purl": "pkg:deb/debian/libnet-cidr-lite-perl?arch=source&distro=forky",
            "ecosystem": "Debian:14"
          },
          "versions": [
            "0.22-2",
            "0.22-3~deb12u1",
            "0.22-3~deb12u2",
            "0.22-3~deb13u1",
            "0.22-3~deb13u2"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-40199.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        }
      ],
      "modified": "2026-10-27T09:47:33.781945962Z",
      "provider": "osv",
      "upstream": [
        "CVE-2026-40199"
      ],
      "references": [
        "https://security-tracker.debian.org/tracker/CVE-2026-40199"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2026-40199",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 460878,
  "published_at": "2026-04-10T22:16:21.597+00:00"
}