cve.bz

CVE-2023-38497 Insecure Preserved Inherited Permissions

7.3 highEPSS 0.7%Fix available

High (7.3). EPSS 0.7% estimated probability of exploitation activity in the next 30 days. Fixed in cargo 0.72.2.

On this page
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`.

Severity

CVSS 3.1

7.3 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
EPSS
0.7% (unchanged from 0.7% a week ago; 0.7% 30 days ago) estimated probability of exploitation activity in the next 30 days; 54th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2024-10-08. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-732 Incorrect Permission Assignment for Critical Resource
CWE-278 Insecure Preserved Inherited Permissions
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2023-38497 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2023-38497?via=ask-ai-copy and https://cve.bz/cve/CVE-2023-38497?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2023-38497 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
rust-lang:cargobefore 0.72.2
fedoraproject:fedora38

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-j3xp-wfr4-hx87crates.iocargo<0.72.20.72.2

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12cargo, rust-cargono fix listedDEBIAN-CVE-2023-38497
Debian13, 14rust-cargo0.76.0-1DEBIAN-CVE-2023-38497
Ubuntu24.04:LTSrust-cargono fix listedUBUNTU-CVE-2023-38497
Ubuntu24.04:LTSrustc1.71.1+dfsg0ubuntu2-0ubuntu1UBUNTU-CVE-2023-38497
UbuntuPro:16.04:LTScargo0.47.0-1~exp1ubuntu1~16.04.1+esm1UBUNTU-CVE-2023-38497 USN-6275-1
UbuntuPro:18.04:LTScargo0.66.0+ds0ubuntu0.libgit2-0ubuntu0.18.04.1~esm1UBUNTU-CVE-2023-38497 USN-6275-1
UbuntuPro:20.04:LTScargo0.67.1+ds0ubuntu0.libgit2-0ubuntu0.20.04.2+esm1UBUNTU-CVE-2023-38497 USN-6275-1
UbuntuPro:22.04:LTScargo0.67.1+ds0ubuntu0.libgit2-0ubuntu0.22.04.2+esm1UBUNTU-CVE-2023-38497 USN-6275-1
UbuntuPro:22.04:LTSrust-cargo0.57.0-1ubuntu0.1~esm1UBUNTU-CVE-2023-38497 USN-6275-1
Red Hatdevtools:2023::el7rust-toolset-1.66-rust, rust-toolset-1.66-cargo, rust-toolset-1.66-clippy and 10 more0:1.66.1-2.el7_9RHSA-2023:4651
Red Hatenterprise_linux:8::appstreamrust, cargo, clippy and 18 more0:1.66.1-2.module+el8.8.0+19613+f0bba33bRHSA-2023:4635
Red Hatenterprise_linux:9::appstreamrust, cargo, clippy and 18 more0:1.66.1-2.el9_2RHSA-2023:4634
Red Hatrhel_eus:8.6::appstreamrls, rust, cargo and 18 more0:1.58.1-1.module+el8.6.0+21522+a4bc17c1.1RHSA-2024:3428
Red Hatrhel_eus:8.6::appstreamrust-toolset0:1.58.1-1.module+el8.6.0+14021+586eff1aRHSA-2024:3428
Red Hatrhel_eus:9.0::appstreamrls, rust, cargo and 18 more0:1.58.1-1.el9_0.1RHSA-2024:3418
SUSELinux Enterprise Module for Development Tools 15 SP4, Linux Enterprise Module for Development Tools 15 SP5rust1.711.71.1-150400.9.6.1SUSE-SU-2023:3251-1
openSUSELeap 15.4, Leap 15.5rust1.711.71.1-150400.9.6.1SUSE-SU-2023:3251-1
openSUSETumbleweedrust1.711.71.1-1.1openSUSE-SU-2024:13101-1
AlmaLinux8rust, cargo, clippy and 12 more1.66.1-2.module_el8.8.0+3604+b9bee1fcALSA-2023:4635
AlmaLinux9rust, cargo, clippy and 12 more1.66.1-2.el9_2ALSA-2023:4634
Rocky Linux8rust0:1.66.1-2.module+el8.8.0+1428+0690fceaRLSA-2023:4635
Rocky Linux9rust0:1.66.1-2.el9_2RLSA-2023:4634
Alpinev3.18, v3.19, v3.20 and 3 morerust1.71.1-r0ALPINE-CVE-2023-38497
Alpinev3.24rust, chromium-rust1.71.1-r0ALPINE-CVE-2023-38497
Azure Linux2rust1.72.0-2AZL-28510

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Important.

Red Hat's mitigation

We recommend configuring your system to prevent other local users from accessing the Cargo directory, usually located in `~/.cargo`.

ProductPackageStateAdvisory
Red Hat Developer Toolsrust-toolset-1.66-rust-0:1.66.1-2.el7_9Fixed 2023-08-15RHSA-2023:4651
Red Hat Enterprise Linux 8rust-toolset:rhel8-8080020230807230209.0a78da64Fixed 2023-08-14RHSA-2023:4635
Red Hat Enterprise Linux 8.6 Extended Update Supportrust-toolset:rhel8-8060020240312174911.aeeed864Fixed 2024-05-28RHSA-2024:3428
Red Hat Enterprise Linux 9rust-0:1.66.1-2.el9_2Fixed 2023-08-14RHSA-2023:4634
Red Hat Enterprise Linux 9.0 Extended Update Supportrust-0:1.58.1-1.el9_0.1Fixed 2024-05-28RHSA-2024:3418

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2023-38497.

Attack patterns (CAPEC)

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-732 (11).

References

Check your stackJSON