CVE-2021-45712
HIGH 7.5CVSS 3.1RustEmbed generated `get` method allows for directory traversal when reading files from disk
An issue was discovered in the rust-embed crate before 6.3.0 for Rust. A ../ directory traversal can sometimes occur in debug mode.
- Published
- 26 Dec 2021
- Last modified
- 17 Jun 2026
- Assigned by
- cve@mitre.org
- NVD status
- Modified
- Weakness
- CWE-22
- Also known as
- GHSA-cgw6-f3mj-h742GHSA-xrg3-hmf3-rvgwRUSTSEC-2021-0126
- Sources
- NVDJSONOSV GHSA-cgw6-f3mj-h742JSONOSV GHSA-xrg3-hmf3-rvgwJSONOSV RUSTSEC-2021-0126JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| OSV | GitHub | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 5.0 | AV:N/AC:L/Au:N/C:P/I:N/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | rust-embed_project | rust-embedcpe:2.3:a:rust-embed_project:rust-embed:*:*:*:*:*:rust:*:* |
< 6.3.0 | 6.3.0 |
| OSV | crates.io | rust-embed | < 6.3.0 | 6.3.0 |
| OSV | crates.io | rust-embed | >= 0.0.0-0, < 6.3.0 | 6.3.0 |
References
- https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/rust-embed/RUSTSEC-2021-0126.md · Exploit, Third Party Advisory, WEB
- https://rustsec.org/advisories/RUSTSEC-2021-0126.html · Exploit, Issue Tracking, Third Party Advisory, WEB, ADVISORY
- https://github.com/pyros2097/rust-embed/issues/159 · WEB, REPORT
- https://github.com/pyros2097/rust-embed · PACKAGE
- https://nvd.nist.gov/vuln/detail/CVE-2021-45712 · ADVISORY
- https://crates.io/crates/rust-embed · PACKAGE
History
- 25 Nov 2026 20:33 UTC · NVD: first stored (published 26 Dec 2021)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 29 Nov 2021)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 6 Jan 2022)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 17 Jun 2022)