Vulnerabilities / CVE-2021-29922

critical

CVE-2021-29922

rust: incorrect parsing of extraneous zero characters at the beginning of an IP address string

Published Modified
In the Trivy database since at least 24 Oct 2026, 07:11 UTCWhen it arrived before that build is not recorded.

Severity by source

NVD9.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
Red Hat7.3CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L

Trivy's own label is CRITICAL. Rated critical by NVD, Photon OS. Rated lower by Red Hat (medium), AlmaLinux (medium), Oracle (medium), Rocky Linux (medium), Ubuntu (medium).

Description

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.

Affected packages and fixed versions

SourcePackageFixed in
Photon OS 3.0rust1.51.0-4.ph3
Photon OS 4.0rust1.51.0-4.ph4
alma 8rust-toolset:rhel8::rust-toolset1.54.0-1.module_el8.5.0+2599+d655d86c
alpine 3.14rust1.52.1-r1
alpine 3.15rust1.52.1-r1
alpine 3.16rust1.52.1-r1
alpine 3.17rust1.52.1-r1
alpine 3.18rust1.52.1-r1
alpine 3.19rust1.52.1-r1
alpine 3.20rust1.52.1-r1
alpine 3.21rust1.52.1-r1
alpine 3.22rust1.52.1-r1
Show all 62 entries from 30 sources
SourcePackageFixed in
Photon OS 3.0rust1.51.0-4.ph3
Photon OS 4.0rust1.51.0-4.ph4
alma 8rust-toolset:rhel8::rust-toolset1.54.0-1.module_el8.5.0+2599+d655d86c
alpine 3.14rust1.52.1-r1
alpine 3.15rust1.52.1-r1
alpine 3.16rust1.52.1-r1
alpine 3.17rust1.52.1-r1
alpine 3.18rust1.52.1-r1
alpine 3.19rust1.52.1-r1
alpine 3.20rust1.52.1-r1
alpine 3.21rust1.52.1-r1
alpine 3.22rust1.52.1-r1
alpine 3.23rust1.52.1-r1
alpine 3.24chromium-rust1.52.1-r1
alpine 3.24rust1.52.1-r1
alpine edgerust1.52.1-r1
debian 10rustcno fix listed
debian 11rustcno fix listed
debian 12rustc1.53.0+dfsg1-1
debian 13rustc1.53.0+dfsg1-1
debian 14rustc1.53.0+dfsg1-1
debian 9rustcno fix listed
echorustc1.53.0+dfsg1-1
Oracle Linux 8cargo1.54.0-2.module+el8.5.0+20381+6e029bfc
Oracle Linux 8cargo-doc1.54.0-2.module+el8.5.0+20381+6e029bfc
Oracle Linux 8clippy1.54.0-2.module+el8.5.0+20381+6e029bfc
Oracle Linux 8rls1.54.0-2.module+el8.5.0+20381+6e029bfc
Oracle Linux 8rust1.54.0-2.module+el8.5.0+20381+6e029bfc
Oracle Linux 8rust-analysis1.54.0-2.module+el8.5.0+20381+6e029bfc
Oracle Linux 8rust-debugger-common1.54.0-2.module+el8.5.0+20381+6e029bfc
Oracle Linux 8rust-doc1.54.0-2.module+el8.5.0+20381+6e029bfc
Oracle Linux 8rust-gdb1.54.0-2.module+el8.5.0+20381+6e029bfc
Oracle Linux 8rust-lldb1.54.0-2.module+el8.5.0+20381+6e029bfc
Oracle Linux 8rust-src1.54.0-2.module+el8.5.0+20381+6e029bfc
Oracle Linux 8rust-std-static1.54.0-2.module+el8.5.0+20381+6e029bfc
Oracle Linux 8rust-std-static-wasm32-unknown-unknown1.54.0-2.module+el8.5.0+20381+6e029bfc
Oracle Linux 8rust-toolset1.54.0-1.module+el8.5.0+20381+6e029bfc
Oracle Linux 8rustfmt1.54.0-2.module+el8.5.0+20381+6e029bfc
rapidfort ubuntu 20.04rf-rustc0:1.61.0+dfsg1-1~exp1ubuntu1
rapidfort ubuntu 20.04rustc0:1.61.0+dfsg1-1~exp1ubuntu1, 0:1.68.0+dfsg0ubuntu1-0ubuntu1
rapidfort ubuntu 22.04rf-rustc0:1.61.0+dfsg1-1~exp1ubuntu1
rapidfort ubuntu 22.04rustc0:1.61.0+dfsg1-1~exp1ubuntu1, 0:1.68.0+dfsg0ubuntu1-0ubuntu1
rapidfort ubuntu 24.04rf-rustc0:1.61.0+dfsg1-1~exp1ubuntu1
rapidfort ubuntu 24.04rustc0:1.61.0+dfsg1-1~exp1ubuntu1, 0:1.68.0+dfsg0ubuntu1-0ubuntu1
rocky 8rust-toolset:rhel8::cargo1.54.0-2.module+el8.5.0+678+cf7bc64b
rocky 8rust-toolset:rhel8::cargo-doc1.54.0-2.module+el8.5.0+678+cf7bc64b
rocky 8rust-toolset:rhel8::clippy1.54.0-2.module+el8.5.0+678+cf7bc64b
rocky 8rust-toolset:rhel8::rls1.54.0-2.module+el8.5.0+678+cf7bc64b
rocky 8rust-toolset:rhel8::rust1.54.0-2.module+el8.5.0+678+cf7bc64b
rocky 8rust-toolset:rhel8::rust-analysis1.54.0-2.module+el8.5.0+678+cf7bc64b
rocky 8rust-toolset:rhel8::rust-debugger-common1.54.0-2.module+el8.5.0+678+cf7bc64b
rocky 8rust-toolset:rhel8::rust-doc1.54.0-2.module+el8.5.0+678+cf7bc64b
rocky 8rust-toolset:rhel8::rust-gdb1.54.0-2.module+el8.5.0+678+cf7bc64b
rocky 8rust-toolset:rhel8::rust-lldb1.54.0-2.module+el8.5.0+678+cf7bc64b
rocky 8rust-toolset:rhel8::rust-src1.54.0-2.module+el8.5.0+678+cf7bc64b
rocky 8rust-toolset:rhel8::rust-std-static1.54.0-2.module+el8.5.0+678+cf7bc64b
rocky 8rust-toolset:rhel8::rust-std-static-wasm32-unknown-unknown1.54.0-2.module+el8.5.0+678+cf7bc64b
rocky 8rust-toolset:rhel8::rust-toolset1.54.0-1.module+el8.5.0+678+cf7bc64b
rocky 8rust-toolset:rhel8::rustfmt1.54.0-2.module+el8.5.0+678+cf7bc64b
ubuntu 20.04rustc1.53.0+dfsg1+llvm-4ubuntu1~20.04.1
ubuntu 20.04-ESMrustc1.53.0+dfsg1+llvm-4ubuntu1~20.04.1
ubuntu 22.04rustc1.53.0+dfsg1+llvm-4ubuntu1

References

All 16 references

Vulnerability data compiled from the Trivy vulnerability database (trivy-db, Aqua Security, Apache License 2.0), which aggregates third-party advisories. CVE records are published by The MITRE Corporation under the CVE Terms of Use; CVE is a trademark of MITRE. This product uses data from the NVD API but is not endorsed or certified by the NVD. Severity, titles and advisory data from the GitHub Advisory Database (CC BY 4.0), Red Hat security data (CC BY 4.0) and the other sources linked on each entry. Entries may be summarised or re-formatted; the linked original is the authoritative record.