CVE-2021-29922: library/std/src/net/parser.rs in Rust before 1.53.0 does not properly consider extraneous zero characters at the beginning of an IP address string, which (in some situations) allows attackers to...
Critical CVSS 9.1
- CVE id
- CVE-2021-29922
- Published
- Last modified
Affected packages
| Package | Affected versions | Fixed in |
|---|---|---|
| Rust Runtimes and servers |
< 1.53.0 | 1.53.0 |
How to fix it
Upgrade Rust to 1.53.0 or later.
rustc --version
- Build with the patched Rust toolchain (rustup update, or rust-toolchain.toml) and redeploy.
A free AIssue account reads the runtime versions your repositories pin (version files, Dockerfiles, build files) and tells you when one is affected.
Details
library/std/src/net/parser.rs in Rust before 1.53.0 does not properly consider extraneous zero characters at the beginning of an IP address string, which (in some situations) allows attackers to bypass access control that is based on IP addresses, because of unexpected octal interpretation.
References
- CVE-2021-29922 on the NVD
- Advisory: https://nvd.nist.gov/vuln/detail/CVE-2021-29922
- Web: https://defcon.org/html/defcon-29/dc-29-speakers.html#kaoudis
- Web: https://doc.rust-lang.org/beta/std/net/struct.Ipv4Addr.html
- Web: https://github.com/rust-lang/rust/issues/83648
- Web: https://github.com/rust-lang/rust/pull/83652
- Web: https://github.com/sickcodes/security/blob/master/advisories/SICK-2021-015.md
- Web: https://security.gentoo.org/glsa/202210-09
- Web: https://defcon.org/html/defcon-29/dc-29-speakers.html#kaoudis
- Web: https://doc.rust-lang.org/beta/std/net/struct.Ipv4Addr.html
- Web: https://github.com/rust-lang/rust/issues/83648
- Web: https://github.com/rust-lang/rust/pull/83652
- Web: https://github.com/sickcodes/security/blob/master/advisories/SICK-2021-015.md
- Web: https://security.gentoo.org/glsa/202210-09
Am I affected?
Upload or paste your lockfile. We check every package version in it against OSV.dev, this advisory included, and email you the vulnerable ones with the version that fixes them. Free, and no account needed.
About this data
Source: National Vulnerability Database (NVD) (public domain). Severity comes from the advisory's own rating when it has one, else from its CVSS score.