Description
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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| MRSAM | Net::CIDR | < 0.24 | 0.24 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | libnet-cidr-perl | 0.25-1 | — |
| Debian 13 | libnet-cidr-perl | 0.25-1 | — |
| Debian 12 | libnet-cidr-perl | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 24.04 LTS | libnet-cidr-perl | 0.21-2ubuntu0.2 | — |
| Ubuntu 22.04 LTS | libnet-cidr-perl | 0.21-1ubuntu0.2 | — |
Show 4 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 20.04 LTS | libnet-cidr-perl | 0.20-1ubuntu0.1~esm2 | — |
| Ubuntu Pro 18.04 LTS | libnet-cidr-perl | 0.18-1ubuntu0.1~esm2 | — |
| Ubuntu Pro 16.04 LTS | libnet-cidr-perl | 0.17-1ubuntu0.16.04.1~esm2 | — |
| Ubuntu Pro 14.04 LTS | libnet-cidr-perl | 0.17-1ubuntu0.14.04.1~esm2 | — |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | perl-Net-CIDR | 0.270.0-2.1 | openSUSE-SU-2026:10756-1 |
Advisories 2
- WID-SEC-2026-0688 cPanel cPanel/WHM: Mehrere Schwachstellen BSI CERT-Bund (WID) · May 21, 2026
- openSUSE-SU-2026:10756-1 perl-Net-CIDR-0.270.0-2.1 on GA media SUSE / openSUSE Security Updates · May 13, 2026