LiveActive security incident?Get immediate response
CVE Record

CVE-2021-4456: Net::CIDR versions before 0.24 for Perl mishandle leading zeros in IP CIDR addresses, which may have unspecified impact

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.

MediumCVSS 6.5Not KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

A Perl library used to handle IP address ranges can mis-handle IPs with leading zeros. If an application relies on this library for allowlists, blocklists, or network access decisions, crafted input could cause the application to interpret an IP address differently than intended and potentially bypass controls.

Executive priority

Treat as a targeted remediation item for applications that make security decisions based on IP ranges. It is not currently evidenced as exploited, but it can affect access control integrity in exposed services using vulnerable library versions.

Technical view

Net::CIDR before 0.24 may return CIDR strings with leading zeros from addr2cidr and cidrlookup. Later consumers may parse those octets as octal values. The CVE notes possible IP-based access control bypass when untrusted input is processed without cidrvalidate. CVSS is 6.5, CWE-704.

Likely exposure

Exposure is most likely in Perl applications using Net::CIDR before 0.24 for IP allowlists, deny lists, routing logic, or authorization checks, especially where CIDR or IP input is user-controlled or externally supplied.

Exploitation context

The provided sources do not show active exploitation, and the CVE is not marked KEV. Exploitation depends on application logic: the library output must feed a downstream parser or decision point that treats leading-zero octets as octal.

Researcher notes

Key uncertainty is application impact. The library flaw alone is context-dependent; prioritize review of call sites where untrusted IP or CIDR data reaches addr2cidr or cidrlookup and the result influences allow, deny, or trust decisions.

Mitigation direction

  • Upgrade Net::CIDR to version 0.24 or later where available.
  • Review vendor release notes and the referenced patch before deployment.
  • Validate untrusted CIDR strings with cidrvalidate as documented.
  • Normalize or reject IP strings containing ambiguous leading-zero octets.
  • Audit access-control code paths that depend on Net::CIDR output.

Validation and detection

  • Inventory Perl dependencies for Net::CIDR and identify versions below 0.24.
  • Search code for addr2cidr, cidrlookup, and cidrvalidate usage.
  • Confirm untrusted input is validated before CIDR conversion or lookup.
  • Test authorization decisions with leading-zero IP inputs in a safe environment.
  • Verify upgraded deployments no longer emit ambiguous leading-zero CIDR strings.
Prepared
Confidence
high
Sources
5

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-704: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2021-4456 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Medium
CVSS
6.5 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
4Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
6.5CVSS 3.1MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N3.92.5Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

6.5Medium
CVSS 3.1 vector shape for CVE-2021-4456Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
MRSAMNet::CIDRNet-CIDR, 0unaffected
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-704 · source CWE mapping

Incorrect Type Conversion or Cast

Incorrect Type Conversion or Cast represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.