CVE-2021-4456 Net::CIDR versions before 0.24 for Perl mishandle leading zeros in IP CIDR addresses, which may have unspecified impact
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- Proof of concept public · automatable: yes · technical impact: partial
- Technology
- UbuntuDebian
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.
Upgrade path
10 packages: 9 fixed, 1 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| debian/libnet-cidr-perl(Debian 12) | = 0.21-2; = 0.23-1; = 0.25-1; = 0.27-1 +1 more | No fix listed | No fix yet |
| debian/libnet-cidr-perl(Debian 13) | < 0.25-1 | 0.25-1 | Fixed |
| debian/libnet-cidr-perl(Debian 14) | < 0.25-1 | 0.25-1 | Fixed |
| MRSAM Net::CIDR | < 0.24 | 0.24 | Fixed |
| ubuntu/libnet-cidr-perl(Ubuntu 22.04) | < 0.21-1ubuntu0.2; = 0.20-1; = 0.21-1 | 0.21-1ubuntu0.2 | Fixed |
| ubuntu/libnet-cidr-perl(Ubuntu 24.04) | < 0.21-2ubuntu0.2; = 0.21-2 | 0.21-2ubuntu0.2 | Fixed |
| ubuntu/libnet-cidr-perl(Ubuntu Pro 14.04) | < 0.17-1ubuntu0.14.04.1~esm2; = 0.17-1 | 0.17-1ubuntu0.14.04.1~esm2 | Fixed |
| ubuntu/libnet-cidr-perl(Ubuntu Pro 16.04) | < 0.17-1ubuntu0.16.04.1~esm2; = 0.17-1 | 0.17-1ubuntu0.16.04.1~esm2 | Fixed |
| ubuntu/libnet-cidr-perl(Ubuntu Pro 18.04) | < 0.18-1ubuntu0.1~esm2; = 0.18-1 | 0.18-1ubuntu0.1~esm2 | Fixed |
| ubuntu/libnet-cidr-perl(Ubuntu Pro 20.04) | < 0.20-1ubuntu0.1~esm2; = 0.20-1 | 0.20-1ubuntu0.1~esm2 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| debian/libnet-cidr-perl(Debian:12) | All versions | No fix listed |
| debian/libnet-cidr-perl(Debian:12) | = 0.21-2 | No fix listed |
| debian/libnet-cidr-perl(Debian:12) | = 0.23-1 | No fix listed |
| debian/libnet-cidr-perl(Debian:12) | = 0.25-1 | No fix listed |
| debian/libnet-cidr-perl(Debian:12) | = 0.27-1 | No fix listed |
| debian/libnet-cidr-perl(Debian:13) | < 0.25-1 | 0.25-1 |
| debian/libnet-cidr-perl(Debian:14) | < 0.25-1 | 0.25-1 |
| ubuntu/libnet-cidr-perl(Ubuntu:22.04) | < 0.21-1ubuntu0.2 | 0.21-1ubuntu0.2 |
| ubuntu/libnet-cidr-perl(Ubuntu:24.04) | < 0.21-2ubuntu0.2 | 0.21-2ubuntu0.2 |
| MRSAM Net::CIDR | < 0.24 | 0.24 |
| ubuntu/libnet-cidr-perl(Ubuntu:Pro:14.04) | < 0.17-1ubuntu0.14.04.1~esm2 | 0.17-1ubuntu0.14.04.1~esm2 |
| ubuntu/libnet-cidr-perl(Ubuntu:Pro:14.04) | = 0.17-1 | No fix listed |
| ubuntu/libnet-cidr-perl(Ubuntu:Pro:16.04) | < 0.17-1ubuntu0.16.04.1~esm2 | 0.17-1ubuntu0.16.04.1~esm2 |
| ubuntu/libnet-cidr-perl(Ubuntu:Pro:16.04) | = 0.17-1 | No fix listed |
| ubuntu/libnet-cidr-perl(Ubuntu:Pro:18.04) | < 0.18-1ubuntu0.1~esm2 | 0.18-1ubuntu0.1~esm2 |
| ubuntu/libnet-cidr-perl(Ubuntu:Pro:18.04) | = 0.18-1 | No fix listed |
| ubuntu/libnet-cidr-perl(Ubuntu:Pro:20.04) | < 0.20-1ubuntu0.1~esm2 | 0.20-1ubuntu0.1~esm2 |
| ubuntu/libnet-cidr-perl(Ubuntu:Pro:20.04) | = 0.20-1 | No fix listed |
| ubuntu/libnet-cidr-perl(Ubuntu:22.04) | = 0.20-1 | No fix listed |
| ubuntu/libnet-cidr-perl(Ubuntu:22.04) | = 0.21-1 | No fix listed |
| ubuntu/libnet-cidr-perl(Ubuntu:24.04) | = 0.21-2 | No fix listed |
References
- Debian Security Tracker CVE-2021-4456 vendor-advisory
- Ubuntu CVE tracker issue-tracking vendor-advisory
- USN-8110-1 vendor-advisory
- www.cve.org issue-tracking
- blog.urth.org issue-tracking related third-party-advisory
- github.com issue-tracking patch
- metacpan.org issue-tracking release-notes
- lists.security.metacpan.org issue-tracking