{"answers":{"affected":"2 open source packages ship an affected version, including cargo. It affects 2 products.","exploited":"There is no known exploitation of CVE-2023-38497 in the wild and no public exploit code.","fix":"Upgrade cargo to 0.72.2 or later.","what":"CVE-2023-38497 is a high-severity vulnerability in Fedoraproject Fedora, published on 4 Aug 2023. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2023-38497 and fix it if it is affected.\n\nWhat it is: CVE-2023-38497 is a high-severity vulnerability in Fedoraproject Fedora, published on 4 Aug 2023. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2023-38497 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- cargo (crates.io): affected all versions; fixed in 0.72.2\n- cargo (crates.io): affected all versions; fixed in 0.72.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2023-38497/ (Markdown: https://insights.sbomify.com/CVE-2023-38497/index.md)","id":"CVE-2023-38497","markdown":"https://insights.sbomify.com/CVE-2023-38497/index.md","name":"CVE-2023-38497","record":{"aliases":["ALPINE-CVE-2023-38497","ALSA-2023:4634","ALSA-2023:4635","AZL-28510","CLEANSTART-2026-SJ40187","DEBIAN-CVE-2023-38497","GHSA-j3xp-wfr4-hx87","RHSA-2023:4634","RHSA-2023:4635","RHSA-2023:4651","RHSA-2024:3418","RHSA-2024:3428","RLSA-2023:4634","RLSA-2023:4635","SUSE-SU-2023:3251-1","UBUNTU-CVE-2023-38497","USN-6275-1","openSUSE-SU-2024:13101-1"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["code_execution","privilege_escalation"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Rust package manager","requires_auth":"low_privilege","summary":"Local attackers can modify source code in shared Cargo caches due to improper file permissions, leading to arbitrary code execution for other users.","user_interaction":"required","vuln_class":"privilege_escalation"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"fedora","vendor":"fedoraproject"},{"product":"cargo","vendor":"rust-lang"}],"cvss":{"score":7.8,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-732","name":"Incorrect Permission Assignment for Critical Resource"},{"id":"CWE-278","name":"Insecure Preserved Inherited Permissions"}],"description":"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`.","ecosystems":["AlmaLinux:8","AlmaLinux:9","Red Hat:devtools:2023::el7","Red Hat:enterprise_linux:8::appstream","Red Hat:enterprise_linux:9::appstream","Red Hat:rhel_eus:8.6::appstream","Red Hat:rhel_eus:9.0::appstream","Rocky Linux:8","Rocky Linux:9","SUSE:Linux Enterprise Module for Development Tools 15 SP4","SUSE:Linux Enterprise Module for Development Tools 15 SP5","crates.io","openSUSE:Leap 15.4","openSUSE:Leap 15.5","openSUSE:Tumbleweed"],"exploits":{"exploitdb":0,"first_seen":"2023-08-04","github_poc":1,"max_poc_stars":1,"metasploit":0,"nuclei":0,"refs":[{"date":"2023-08-04T16:36:10Z","kind":"github_poc","ref":"https://github.com/lucas-cauhe/cargo-perm","stars":1,"title":"Cargo exploit from CVE-2023-38497"}],"tier":"poc_unverified"},"has_fix":true,"headline":"Cargo not respecting umask when extracting crate archives","id":"CVE-2023-38497","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"crates.io","product":"fedoraproject:fedora","products":["fedoraproject:fedora"],"type":"privilege_escalation","year":"2023"},"n_packages":137,"n_references":8,"next":{"headline":"Discourse vulnerable to DoS via defer queue","id":"CVE-2023-38498"},"packages":[{"ecosystem":"crates.io","fixed":["0.72.2"],"introduced":["0"],"last_affected":[],"package":"cargo","purl":null,"source":"GHSA-j3xp-wfr4-hx87"},{"ecosystem":"crates.io","fixed":["0.72.2"],"introduced":["0"],"last_affected":[],"package":"cargo","purl":"pkg:cargo/cargo","source":"GHSA-j3xp-wfr4-hx87"},{"ecosystem":"AlmaLinux:8","fixed":["1.66.1-2.module_el8.8.0+3604+b9bee1fc"],"introduced":["0"],"last_affected":[],"package":"cargo","purl":"pkg:rpm/almalinux/cargo","source":"ALSA-2023:4635"},{"ecosystem":"AlmaLinux:8","fixed":["1.66.1-2.module_el8.8.0+3604+b9bee1fc"],"introduced":["0"],"last_affected":[],"package":"clippy","purl":"pkg:rpm/almalinux/clippy","source":"ALSA-2023:4635"},{"ecosystem":"AlmaLinux:8","fixed":["1.66.1-2.module_el8.8.0+3604+b9bee1fc"],"introduced":["0"],"last_affected":[],"package":"rust","purl":"pkg:rpm/almalinux/rust","source":"ALSA-2023:4635"},{"ecosystem":"AlmaLinux:8","fixed":["1.66.1-2.module_el8.8.0+3604+b9bee1fc"],"introduced":["0"],"last_affected":[],"package":"rust-analysis","purl":"pkg:rpm/almalinux/rust-analysis","source":"ALSA-2023:4635"},{"ecosystem":"AlmaLinux:8","fixed":["1.66.1-2.module_el8.8.0+3604+b9bee1fc"],"introduced":["0"],"last_affected":[],"package":"rust-analyzer","purl":"pkg:rpm/almalinux/rust-analyzer","source":"ALSA-2023:4635"},{"ecosystem":"AlmaLinux:8","fixed":["1.66.1-2.module_el8.8.0+3604+b9bee1fc"],"introduced":["0"],"last_affected":[],"package":"rust-debugger-common","purl":"pkg:rpm/almalinux/rust-debugger-common","source":"ALSA-2023:4635"},{"ecosystem":"AlmaLinux:8","fixed":["1.66.1-2.module_el8.8.0+3604+b9bee1fc"],"introduced":["0"],"last_affected":[],"package":"rust-doc","purl":"pkg:rpm/almalinux/rust-doc","source":"ALSA-2023:4635"},{"ecosystem":"AlmaLinux:8","fixed":["1.66.1-2.module_el8.8.0+3604+b9bee1fc"],"introduced":["0"],"last_affected":[],"package":"rust-gdb","purl":"pkg:rpm/almalinux/rust-gdb","source":"ALSA-2023:4635"},{"ecosystem":"AlmaLinux:8","fixed":["1.66.1-2.module_el8.8.0+3604+b9bee1fc"],"introduced":["0"],"last_affected":[],"package":"rust-lldb","purl":"pkg:rpm/almalinux/rust-lldb","source":"ALSA-2023:4635"},{"ecosystem":"AlmaLinux:8","fixed":["1.66.1-2.module_el8.8.0+3604+b9bee1fc"],"introduced":["0"],"last_affected":[],"package":"rust-src","purl":"pkg:rpm/almalinux/rust-src","source":"ALSA-2023:4635"},{"ecosystem":"AlmaLinux:8","fixed":["1.66.1-2.module_el8.8.0+3604+b9bee1fc"],"introduced":["0"],"last_affected":[],"package":"rust-std-static","purl":"pkg:rpm/almalinux/rust-std-static","source":"ALSA-2023:4635"},{"ecosystem":"AlmaLinux:8","fixed":["1.66.1-2.module_el8.8.0+3604+b9bee1fc"],"introduced":["0"],"last_affected":[],"package":"rust-std-static-wasm32-unknown-unknown","purl":"pkg:rpm/almalinux/rust-std-static-wasm32-unknown-unknown","source":"ALSA-2023:4635"},{"ecosystem":"AlmaLinux:8","fixed":["1.66.1-2.module_el8.8.0+3604+b9bee1fc"],"introduced":["0"],"last_affected":[],"package":"rust-std-static-wasm32-wasi","purl":"pkg:rpm/almalinux/rust-std-static-wasm32-wasi","source":"ALSA-2023:4635"},{"ecosystem":"AlmaLinux:8","fixed":["1.66.1-2.module_el8.8.0+3604+b9bee1fc"],"introduced":["0"],"last_affected":[],"package":"rust-toolset","purl":"pkg:rpm/almalinux/rust-toolset","source":"ALSA-2023:4635"},{"ecosystem":"AlmaLinux:8","fixed":["1.66.1-2.module_el8.8.0+3604+b9bee1fc"],"introduced":["0"],"last_affected":[],"package":"rustfmt","purl":"pkg:rpm/almalinux/rustfmt","source":"ALSA-2023:4635"},{"ecosystem":"AlmaLinux:9","fixed":["1.66.1-2.el9_2"],"introduced":["0"],"last_affected":[],"package":"cargo","purl":"pkg:rpm/almalinux/cargo","source":"ALSA-2023:4634"},{"ecosystem":"AlmaLinux:9","fixed":["1.66.1-2.el9_2"],"introduced":["0"],"last_affected":[],"package":"clippy","purl":"pkg:rpm/almalinux/clippy","source":"ALSA-2023:4634"},{"ecosystem":"AlmaLinux:9","fixed":["1.66.1-2.el9_2"],"introduced":["0"],"last_affected":[],"package":"rust","purl":"pkg:rpm/almalinux/rust","source":"ALSA-2023:4634"},{"ecosystem":"AlmaLinux:9","fixed":["1.66.1-2.el9_2"],"introduced":["0"],"last_affected":[],"package":"rust-analysis","purl":"pkg:rpm/almalinux/rust-analysis","source":"ALSA-2023:4634"},{"ecosystem":"AlmaLinux:9","fixed":["1.66.1-2.el9_2"],"introduced":["0"],"last_affected":[],"package":"rust-analyzer","purl":"pkg:rpm/almalinux/rust-analyzer","source":"ALSA-2023:4634"},{"ecosystem":"AlmaLinux:9","fixed":["1.66.1-2.el9_2"],"introduced":["0"],"last_affected":[],"package":"rust-debugger-common","purl":"pkg:rpm/almalinux/rust-debugger-common","source":"ALSA-2023:4634"},{"ecosystem":"AlmaLinux:9","fixed":["1.66.1-2.el9_2"],"introduced":["0"],"last_affected":[],"package":"rust-doc","purl":"pkg:rpm/almalinux/rust-doc","source":"ALSA-2023:4634"},{"ecosystem":"AlmaLinux:9","fixed":["1.66.1-2.el9_2"],"introduced":["0"],"last_affected":[],"package":"rust-gdb","purl":"pkg:rpm/almalinux/rust-gdb","source":"ALSA-2023:4634"},{"ecosystem":"AlmaLinux:9","fixed":["1.66.1-2.el9_2"],"introduced":["0"],"last_affected":[],"package":"rust-lldb","purl":"pkg:rpm/almalinux/rust-lldb","source":"ALSA-2023:4634"},{"ecosystem":"AlmaLinux:9","fixed":["1.66.1-2.el9_2"],"introduced":["0"],"last_affected":[],"package":"rust-src","purl":"pkg:rpm/almalinux/rust-src","source":"ALSA-2023:4634"},{"ecosystem":"AlmaLinux:9","fixed":["1.66.1-2.el9_2"],"introduced":["0"],"last_affected":[],"package":"rust-std-static","purl":"pkg:rpm/almalinux/rust-std-static","source":"ALSA-2023:4634"},{"ecosystem":"AlmaLinux:9","fixed":["1.66.1-2.el9_2"],"introduced":["0"],"last_affected":[],"package":"rust-std-static-wasm32-unknown-unknown","purl":"pkg:rpm/almalinux/rust-std-static-wasm32-unknown-unknown","source":"ALSA-2023:4634"},{"ecosystem":"AlmaLinux:9","fixed":["1.66.1-2.el9_2"],"introduced":["0"],"last_affected":[],"package":"rust-std-static-wasm32-wasi","purl":"pkg:rpm/almalinux/rust-std-static-wasm32-wasi","source":"ALSA-2023:4634"},{"ecosystem":"AlmaLinux:9","fixed":["1.66.1-2.el9_2"],"introduced":["0"],"last_affected":[],"package":"rust-toolset","purl":"pkg:rpm/almalinux/rust-toolset","source":"ALSA-2023:4634"},{"ecosystem":"AlmaLinux:9","fixed":["1.66.1-2.el9_2"],"introduced":["0"],"last_affected":[],"package":"rustfmt","purl":"pkg:rpm/almalinux/rustfmt","source":"ALSA-2023:4634"},{"ecosystem":"Red Hat:devtools:2023::el7","fixed":["0:1.66.1-2.el7_9"],"introduced":["0"],"last_affected":[],"package":"rust-toolset-1.66-cargo","purl":"pkg:rpm/redhat/rust-toolset-1.66-cargo","source":"RHSA-2023:4651"},{"ecosystem":"Red Hat:devtools:2023::el7","fixed":["0:1.66.1-2.el7_9"],"introduced":["0"],"last_affected":[],"package":"rust-toolset-1.66-clippy","purl":"pkg:rpm/redhat/rust-toolset-1.66-clippy","source":"RHSA-2023:4651"},{"ecosystem":"Red Hat:devtools:2023::el7","fixed":["0:1.66.1-2.el7_9"],"introduced":["0"],"last_affected":[],"package":"rust-toolset-1.66-rust","purl":"pkg:rpm/redhat/rust-toolset-1.66-rust","source":"RHSA-2023:4651"},{"ecosystem":"Red Hat:devtools:2023::el7","fixed":["0:1.66.1-2.el7_9"],"introduced":["0"],"last_affected":[],"package":"rust-toolset-1.66-rust-analysis","purl":"pkg:rpm/redhat/rust-toolset-1.66-rust-analysis","source":"RHSA-2023:4651"},{"ecosystem":"Red Hat:devtools:2023::el7","fixed":["0:1.66.1-2.el7_9"],"introduced":["0"],"last_affected":[],"package":"rust-toolset-1.66-rust-analyzer","purl":"pkg:rpm/redhat/rust-toolset-1.66-rust-analyzer","source":"RHSA-2023:4651"},{"ecosystem":"Red Hat:devtools:2023::el7","fixed":["0:1.66.1-2.el7_9"],"introduced":["0"],"last_affected":[],"package":"rust-toolset-1.66-rust-debugger-common","purl":"pkg:rpm/redhat/rust-toolset-1.66-rust-debugger-common","source":"RHSA-2023:4651"},{"ecosystem":"Red Hat:devtools:2023::el7","fixed":["0:1.66.1-2.el7_9"],"introduced":["0"],"last_affected":[],"package":"rust-toolset-1.66-rust-debuginfo","purl":"pkg:rpm/redhat/rust-toolset-1.66-rust-debuginfo","source":"RHSA-2023:4651"},{"ecosystem":"Red Hat:devtools:2023::el7","fixed":["0:1.66.1-2.el7_9"],"introduced":["0"],"last_affected":[],"package":"rust-toolset-1.66-rust-doc","purl":"pkg:rpm/redhat/rust-toolset-1.66-rust-doc","source":"RHSA-2023:4651"}],"prev":{"headline":"Apptainer's ineffective privileges drop when requesting container network","id":"CVE-2023-38496"},"products":["cargo"],"published":"2023-08-04","related":[{"cvss_score":9.8,"headline":"PHP-CGI OS Command Injection","id":"CVE-2024-4577","kev_date_added":"2024-06-12","published":"2024-06-09"},{"cvss_score":9.8,"headline":"Grafana Authentication Bypass","id":"CVE-2021-39226","kev_date_added":"2022-08-25","published":"2021-10-05"},{"cvss_score":9.8,"headline":"VMware ESXi and Horizon DaaS OpenSLP Heap-Based Buffer Overflow","id":"CVE-2019-5544","kev_date_added":"2021-11-03","published":"2019-12-06"},{"cvss_score":9.6,"headline":"Google Chromium V8 Type Confusion","id":"CVE-2024-4947","kev_date_added":"2024-05-20","published":"2024-05-15"},{"cvss_score":9.6,"headline":"Google Chromium Visuals Use-After-Free","id":"CVE-2024-4671","kev_date_added":"2024-05-13","published":"2024-05-09"},{"cvss_score":9.6,"headline":"Google Chromium Mojo Insufficient Data Validation","id":"CVE-2022-3075","kev_date_added":"2022-09-08","published":"2022-09-26"},{"cvss_score":9.6,"headline":"Google Chromium Indexed DB API Use-After-Free","id":"CVE-2021-30633","kev_date_added":"2021-11-03","published":"2021-10-08"}],"sources":[{"class":"attribution","licence":"MIT","name":"AlmaLinux","prefix":"ALSA"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Red Hat","prefix":"RHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-02-13","vendors":["rust-lang"]},"summary":"Local attackers can modify source code in shared Cargo caches due to improper file permissions, leading to arbitrary code execution for other users.","url":"https://insights.sbomify.com/CVE-2023-38497/"}