Skip to content
Heist/ feed
Back to feed
MediumFix available

libnet-cidr-perl — security advisory

Type: advisorySources: OSVAdvisory ID: DEBIAN-CVE-2021-4456

Net::CIDR versions before 0.24 for Perl mishandle leading zeros in IP CIDR addresses, which may have unspecified impact. The functions `addr2cidr` and `cidrlookup` may return leading zeros in a CIDR string, which may in turn be parsed as octal numbers by subsequent users. In some cases an attacker may be able to leverage this to bypass access controls based on IP addresses. The documentation advises validating untrusted CIDR strings with the `cidrvalidate` function. However, this mitigation is optional and not enforced by default. In practice, users may call `addr2cidr` or `cidrlookup` with untrusted input and without validation, incorrectly assuming that this is safe.

Products
libnet-cidr-perl
Affected versions
0.21-2, 0.23-1, 0.25-1, 0.27-1
Fixed versions
0.25-1
CVEs
CVE-2021-4456
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 02:02 UTC · Revision 1

Source evidence

DEBIAN-CVE-2021-4456

core-osv · Original source

Published 27 Feb 2026, 01:16 UTC

Net::CIDR versions before 0.24 for Perl mishandle leading zeros in IP CIDR addresses, which may have unspecified impact. The functions `addr2cidr` and `cidrlookup` may return leading zeros in a CIDR string, which may in turn be parsed as octal numbers by subsequent users. In some cases an attacker may be able to leverage this to bypass access controls based on IP addresses. The documentation advises validating untrusted CIDR strings with the `cidrvalidate` function. However, this mitigation is optional and not enforced by default. In practice, users may call `addr2cidr` or `cidrlookup` with untrusted input and without validation, incorrectly assuming that this is safe.

osv:DEBIAN-CVE-2021-4456

libnet-cidr-perl

Fixed versions: Not specified

libnet-cidr-perl

Fixed versions: 0.25-1

libnet-cidr-perl

Fixed versions: 0.25-1

Complete source record
{
  "id": "4b83c2f1cda15a4b5453a0984e462b3b54988c86c53651a1df6a4cef934adb3f",
  "url": "https://osv.dev/vulnerability/DEBIAN-CVE-2021-4456",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "DEBIAN-CVE-2021-4456",
    "summary": "Net::CIDR versions before 0.24 for Perl mishandle leading zeros in IP CIDR addresses, which may have unspecified impact. The functions `addr2cidr` and `cidrlookup` may return leading zeros in a CIDR string, which may in turn be parsed as octal numbers by subsequent users. In some cases an attacker may be able to leverage this to bypass access controls based on IP addresses. The documentation advises validating untrusted CIDR strings with the `cidrvalidate` function. However, this mitigation is optional and not enforced by default. In practice, users may call `addr2cidr` or `cidrlookup` with untrusted input and without validation, incorrectly assuming that this is safe.",
    "evidence": "osv:DEBIAN-CVE-2021-4456",
    "products": [
      {
        "name": {
          "value": "libnet-cidr-perl",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "0.21-2",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.23-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.25-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.27-1",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "libnet-cidr-perl",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "0.25-1",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "libnet-cidr-perl",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "0.25-1",
            "evidence": "/affected/2/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "medium",
    "structured": {
      "id": "DEBIAN-CVE-2021-4456",
      "aliases": [
        "DEBIAN-CVE-2021-4456"
      ],
      "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"
                }
              ]
            }
          ],
          "package": {
            "name": "libnet-cidr-perl",
            "purl": "pkg:deb/debian/libnet-cidr-perl?arch=source&distro=bookworm",
            "ecosystem": "Debian:12"
          },
          "versions": [
            "0.21-2",
            "0.23-1",
            "0.25-1",
            "0.27-1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2021-4456.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "0.25-1"
                }
              ]
            }
          ],
          "package": {
            "name": "libnet-cidr-perl",
            "purl": "pkg:deb/debian/libnet-cidr-perl?arch=source&distro=trixie",
            "ecosystem": "Debian:13"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2021-4456.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "0.25-1"
                }
              ]
            }
          ],
          "package": {
            "name": "libnet-cidr-perl",
            "purl": "pkg:deb/debian/libnet-cidr-perl?arch=source&distro=forky",
            "ecosystem": "Debian:14"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2021-4456.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        }
      ],
      "modified": "2026-10-23T18:05:23.375902686Z",
      "provider": "osv",
      "upstream": [
        "CVE-2021-4456"
      ],
      "references": [
        "https://security-tracker.debian.org/tracker/CVE-2021-4456"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2021-4456",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 424407,
  "published_at": "2026-02-27T01:16:13.553+00:00"
}