ipaddress leading zeros in IPv4 address¶
The ipaddress module accepts leading zeros in IPv4 addresses.
- Disclosure date: 2019-03-20 (Python issue bpo-36384 reported)
- Python 3.6 (need commit)
- Python 3.7 (need commit)
- Python 3.8 (need commit)
- Python 3.9 (need commit)
[security] CVE-2021-29921: ipaddress Should not reject IPv4 addresses with leading zeroes as ambiguously octal.
- Python issue: bpo-36384
- Creation date: 2019-03-20
- Reporter: Joel Croteau
Improper input validation of octal strings in Python stdlib ipaddress 3.10 and below allows unauthenticated remote attackers to perform indeterminate SSRF, RFI, and LFI attacks on many programs that rely on Python stdlib ipaddress. IP address octects are left stripped instead of evaluated as valid IP addresses.
- CVE ID: CVE-2021-29921
- Published: 2021-05-06