Security advisory
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
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2021-4456
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 12:02 UTC · Revision 1
Source evidence
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:CVE-2021-4456
Complete source record
{
"id": "d6362e9020d5835fe4a9b86fba9edbf56db267e1ad7908c904dbe6f9eb4f81d2",
"url": "https://osv.dev/vulnerability/CVE-2021-4456",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "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:CVE-2021-4456",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2021-4456",
"aliases": [
"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": [
{
"repo": "https://github.com/svarshavchik/net-cidr",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "e3648c6bc6bdd018f90cca4149c467017d42bd10"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"fixed": "e3648c6bc6bdd018f90cca4149c467017d42bd10"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-4456.json"
}
}
],
"modified": "2026-10-20T10:55:06.683689628Z",
"provider": "osv",
"references": [
"https://blog.urth.org/2021/03/29/security-issues-in-perl-ip-address-distros/",
"https://metacpan.org/dist/Net-CIDR/changes",
"https://github.com/svarshavchik/Net-CIDR/commit/e3648c6bc6bdd018f90cca4149c467017d42bd10"
],
"provider_metadata": {
"unresolved_ranges": [
{
"cpes": [
"cpe:2.3:a:mrsam:net\\:\\:cidr:*:*:*:*:*:perl:*:*"
],
"vendor_product": "mrsam:net::cidr",
"extracted_events": [
{
"range": [
{
"fixed": "0.24"
}
],
"source": "CPE_RANGE"
}
]
},
{
"extracted_events": [
{
"range": [
{
"fixed": "0.24"
}
],
"source": "DESCRIPTION"
}
]
}
]
}
},
"related_cves": [
{
"value": "CVE-2021-4456",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 386908,
"published_at": "2026-02-27T01:16:13.553+00:00"
}