# CVE-2023-38497: Cargo not respecting umask when extracting crate archives

- Priority: **Routine**
- Reason: Not severe (CVSS 7.8, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2023-08-04 · Modified: 2025-02-13
- Aliases: ALPINE-CVE-2023-38497, SUSE-SU-2023:3251-1, RHSA-2023:4634, RHSA-2023:4635, RHSA-2023:4651, RHSA-2024:3418, RHSA-2024:3428, UBUNTU-CVE-2023-38497, USN-6275-1, DEBIAN-CVE-2023-38497, openSUSE-SU-2024:13101-1, GHSA-j3xp-wfr4-hx87
- Record: https://cvemate.com/vulnerability/CVE-2023-38497 · JSON: https://cvemate.com/vulnerability/CVE-2023-38497/json

## Description

```text
Cargo downloads the Rust project’s dependencies and compiles the project. Cargo prior to version 0.72.2, bundled with Rust prior to version 1.71.1, did not respect the umask when extracting crate archives on UNIX-like systems. If the user downloaded a crate containing files writeable by any local user, another local user could exploit this to change the source code compiled and executed by the current user. To prevent existing cached extractions from being exploitable, the Cargo binary version 0.72.2 included in Rust 1.71.1 or later will purge caches generated by older Cargo versions automatically. As a workaround, configure one's system to prevent other local users from accessing the Cargo directory, usually located in `~/.cargo`.
```

## Signals

- CVSS: 7.8 high (v3.1, CVE.org) CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N
- EPSS: 0.702%, percentile 54.625%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 52)

- alpine chromium-rust (Alpine Linux): \< 1.71.1-r0
- alpine rust (Alpine Linux): \< 1.71.1-r0
- Crates.Io cargo (Crates.Io): \< 0.72.2
- debian cargo (Debian): All versions (No fix recorded)
- debian rust-cargo (Debian): All versions (No fix recorded) \| \< 0.76.0-1
- ubuntu cargo (Ubuntu): \< 0.47.0-1~exp1ubuntu1~16.04.1+esm1 \| \< 0.66.0+ds0ubuntu0.libgit2-0ubuntu0.18.04.1~esm1 \| \< 0.67.1+ds0ubuntu0.libgit2-0ubuntu0.20.04.2+esm1 \| \< 0.67.1+ds0ubuntu0.libgit2-0ubuntu0.22.04.2+esm1
- ubuntu rust-cargo (Ubuntu): \< 0.57.0-1ubuntu0.1~esm1 \| All versions (No fix recorded)
- ubuntu rustc (Ubuntu): \< 1.71.1+dfsg0ubuntu2-0ubuntu1
- fedoraproject fedora: 38
- opensuse rust1.71&distro=openSUSE Leap 15.4 (openSUSE): \< 1.71.1-150400.9.6.1
- opensuse rust1.71&distro=openSUSE Leap 15.5 (openSUSE): \< 1.71.1-150400.9.6.1
- opensuse rust1.71&distro=openSUSE Tumbleweed (openSUSE): \< 1.71.1-1.1
- redhat cargo (Red Hat): \< 0:1.66.1-2.el9\_2 \| \< 0:1.66.1-2.module+el8.8.0+19613+f0bba33b \| \< 0:1.58.1-1.el9\_0.1 \| \< 0:1.58.1-1.module+el8.6.0+21522+a4bc17c1.1
- redhat cargo-debuginfo (Red Hat): \< 0:1.66.1-2.el9\_2 \| \< 0:1.66.1-2.module+el8.8.0+19613+f0bba33b \| \< 0:1.58.1-1.el9\_0.1 \| \< 0:1.58.1-1.module+el8.6.0+21522+a4bc17c1.1
- redhat cargo-doc (Red Hat): \< 0:1.58.1-1.el9\_0.1 \| \< 0:1.58.1-1.module+el8.6.0+21522+a4bc17c1.1
- redhat clippy (Red Hat): \< 0:1.66.1-2.el9\_2 \| \< 0:1.66.1-2.module+el8.8.0+19613+f0bba33b \| \< 0:1.58.1-1.el9\_0.1 \| \< 0:1.58.1-1.module+el8.6.0+21522+a4bc17c1.1
- redhat clippy-debuginfo (Red Hat): \< 0:1.66.1-2.el9\_2 \| \< 0:1.66.1-2.module+el8.8.0+19613+f0bba33b \| \< 0:1.58.1-1.el9\_0.1 \| \< 0:1.58.1-1.module+el8.6.0+21522+a4bc17c1.1
- redhat rls (Red Hat): \< 0:1.58.1-1.el9\_0.1 \| \< 0:1.58.1-1.module+el8.6.0+21522+a4bc17c1.1
- redhat rls-debuginfo (Red Hat): \< 0:1.58.1-1.el9\_0.1 \| \< 0:1.58.1-1.module+el8.6.0+21522+a4bc17c1.1
- redhat rust (Red Hat): \< 0:1.66.1-2.el9\_2 \| \< 0:1.66.1-2.module+el8.8.0+19613+f0bba33b \| \< 0:1.58.1-1.el9\_0.1 \| \< 0:1.58.1-1.module+el8.6.0+21522+a4bc17c1.1

## References (first 20 of 35)

- <https://github.com/rust-lang/cargo/security/advisories/GHSA-j3xp-wfr4-hx87>
- <https://github.com/rust-lang/cargo/pull/12443>
- <https://github.com/rust-lang/cargo/commit/d78bbf4bde3c6b95caca7512f537c6f9721426ff>
- <https://en.wikipedia.org/wiki/Umask>
- <https://github.com/rust-lang/wg-security-response/tree/main/patches/CVE-2023-38497>
- <https://www.rust-lang.org/policies/security>
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/QGKE6PGM4HIQUHPJRBQAHMELINSGN4H4/>
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/QMEXGUGPW5OBSQA6URTBNDSU3RAEFOZ4/>
- <https://security.alpinelinux.org/vuln/CVE-2023-38497>
- <https://www.suse.com/support/update/announcement/2023/suse-su-20233251-1/>
- <https://bugzilla.suse.com/1213817>
- <https://www.suse.com/security/cve/CVE-2023-38497>
- <https://access.redhat.com/errata/RHSA-2023:4634>
- <https://access.redhat.com/security/updates/classification/#important>
- <https://bugzilla.redhat.com/show_bug.cgi?id=2228038>
- <https://security.access.redhat.com/data/csaf/v2/advisories/2023/rhsa-2023_4634.json>
- <https://access.redhat.com/security/cve/CVE-2023-38497>
- <https://www.cve.org/CVERecord?id=CVE-2023-38497>
- <https://nvd.nist.gov/vuln/detail/CVE-2023-38497>
- <https://www.openwall.com/lists/oss-security/2023/08/03/2>

---

Data as of 2026-12-05T10:25:23.876Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
