CVE catalog

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

[CVE catalog]

Severity
High · CVSS 8.2CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N
Published
Source
[NVD] · [CVE record]
EPSS
0.37% · Oct 25, 2026

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.

Vulnerable and fixed packages

Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.

DistributionPackageReleaseVersionStatus
Debianlibnet-cidr-perlsid0.27-1fixed
Debianlibnet-cidr-perlforky0.27-1fixed
Debianlibnet-cidr-perltrixie0.25-1fixed
Debianlibnet-cidr-perlbookworm0.21-2vulnerable
Cpelibnet-cidr-perlNot reportedNot reportedvulnerable
Cpelibnet-cidr-perlNot reported0.21-2ubuntu0.2fixed
Ubuntulibnet-cidr-perlpro0.20-1vulnerable
Ubuntulibnet-cidr-perlpro0.20-1ubuntu0.1~esm2fixed
Ubuntulibnet-cidr-perl22.040.20-1vulnerable
Ubuntulibnet-cidr-perl22.040.21-1vulnerable
Ubuntulibnet-cidr-perl22.040.21-1ubuntu0.2fixed
Ubuntulibnet-cidr-perl24.040.21-2vulnerable
Ubuntulibnet-cidr-perl24.040.21-2ubuntu0.2fixed
Opensuseperl-Net-CIDRtumbleweed0.270.0-2.1fixed
Ubuntulibnet-cidr-perlpro0.20-1vulnerable
Ubuntulibnet-cidr-perlpro0.20-1ubuntu0.1~esm2fixed
Ubuntulibnet-cidr-perl22.040.20-1vulnerable
Ubuntulibnet-cidr-perl22.040.21-1vulnerable
Ubuntulibnet-cidr-perl22.040.21-1ubuntu0.2fixed
Ubuntulibnet-cidr-perl24.040.21-2vulnerable
Ubuntulibnet-cidr-perl24.040.21-2ubuntu0.2fixed

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
Debianlibnet-cidr-perlsourcesid0.25-1not yet assignedNot reportedNot reported
Debianlibnet-cidr-perlsourceforky0.25-1not yet assignedNot reportedNot reported
Debianlibnet-cidr-perlsourcetrixie0.25-1not yet assignedNot reportedNot reported
Debianlibnet-cidr-perlsourcebookworm(unfixed)not yet assignedNot reportedNot reported
Cpelibnet-cidr-perlcpeNot reported0.21-2ubuntu0.2Not reportedNot reportedNot reported
Ubuntulibnet-cidr-perldebpro0.20-1ubuntu0.1~esm2Not reportedUSN-8110-1Not reported
Ubuntulibnet-cidr-perldeb22.040.21-1ubuntu0.2Not reportedUSN-8110-1Not reported
Ubuntulibnet-cidr-perldeb24.040.21-2ubuntu0.2Not reportedUSN-8110-1Not reported
Opensuseperl-Net-CIDRrpmtumbleweed0.270.0-2.1Not reportedOPENSUSE-SU-2026:10756-1Not reported
Ubuntulibnet-cidr-perldebpro0.20-1ubuntu0.1~esm2Not reportedUBUNTU-CVE-2021-4456Not reported
Ubuntulibnet-cidr-perldeb22.040.21-1ubuntu0.2Not reportedUBUNTU-CVE-2021-4456Not reported
Ubuntulibnet-cidr-perldeb24.040.21-2ubuntu0.2Not reportedUBUNTU-CVE-2021-4456Not reported

Notes

[bookworm] libnet-cidr-perl: Minor issue

OpenFactory catalog packages

[Debian 12 (Bookworm)]

  • Details (2)
    • 0.21-2 · all · bookworm

      Affected

      nvd · libnet-cidr-perl · debian · bookworm; nvd · libnet-cidr-perl · debian · 12

    • 0.21-2 · all · bookworm

      Affected

      nvd · libnet-cidr-perl · debian · bookworm; nvd · libnet-cidr-perl · debian · 12

[Debian 13 (Trixie)]

  • Details (2)
    • 0.25-1 · all · trixie

      Fixed · Fixed: 0.25-1

      nvd · libnet-cidr-perl · debian · 13

    • 0.25-1 · all · trixie

      Fixed · Fixed: 0.25-1

      nvd · libnet-cidr-perl · debian · 13

[openSUSE Tumbleweed]

  • Source package: [perl-Net-CIDR]

    Details (1)
    • 0.270.0-2.3 · noarch · tumbleweed

      Fixed · Fixed: 0.270.0-2.1

      nvd · perl-Net-CIDR · opensuse · tumbleweed

Observed:

References