{"api_version":"1","generated_at":"2026-04-23T00:40:12+00:00","cve":"CVE-2023-38497","urls":{"html":"https://cve.report/CVE-2023-38497","api":"https://cve.report/api/cve/CVE-2023-38497.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2023-38497","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2023-38497"},"summary":{"title":"CVE-2023-38497","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`.","state":"PUBLIC","assigner":"security-advisories@github.com","published_at":"2023-08-04 16:15:00","updated_at":"2023-08-17 19:15:00"},"problem_types":["CWE-278"],"metrics":[],"references":[{"url":"https://github.com/rust-lang/wg-security-response/tree/main/patches/CVE-2023-38497","name":"https://github.com/rust-lang/wg-security-response/tree/main/patches/CVE-2023-38497","refsource":"MISC","tags":[],"title":"Patches for CVE-2023-38497","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://www.rust-lang.org/policies/security","name":"https://www.rust-lang.org/policies/security","refsource":"MISC","tags":[],"title":"Security policy - Rust Programming Language","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://en.wikipedia.org/wiki/Umask","name":"https://en.wikipedia.org/wiki/Umask","refsource":"MISC","tags":[],"title":"umask - Wikipedia","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://github.com/rust-lang/cargo/security/advisories/GHSA-j3xp-wfr4-hx87","name":"https://github.com/rust-lang/cargo/security/advisories/GHSA-j3xp-wfr4-hx87","refsource":"MISC","tags":[],"title":"Cargo not respecting umask when extracting crate archives · Advisory · rust-lang/cargo · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/rust-lang/cargo/commit/d78bbf4bde3c6b95caca7512f537c6f9721426ff","name":"https://github.com/rust-lang/cargo/commit/d78bbf4bde3c6b95caca7512f537c6f9721426ff","refsource":"MISC","tags":[],"title":"Auto merge of #12443 - pietroalbini:pa-cve-2023-38497-nightly, r=weih… · rust-lang/cargo@d78bbf4 · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/QMEXGUGPW5OBSQA6URTBNDSU3RAEFOZ4/","name":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/QMEXGUGPW5OBSQA6URTBNDSU3RAEFOZ4/","refsource":"MISC","tags":[],"title":"[SECURITY] Fedora 37 Update: rust-1.71.1-1.fc37 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/rust-lang/cargo/pull/12443","name":"https://github.com/rust-lang/cargo/pull/12443","refsource":"MISC","tags":[],"title":"Fix CVE-2023-38497 for master by pietroalbini · Pull Request #12443 · rust-lang/cargo · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/QGKE6PGM4HIQUHPJRBQAHMELINSGN4H4/","name":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/QGKE6PGM4HIQUHPJRBQAHMELINSGN4H4/","refsource":"MISC","tags":[],"title":"[SECURITY] Fedora 38 Update: rust-1.71.1-1.fc38 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://www.cve.org/CVERecord?id=CVE-2023-38497","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-38497","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2023","cve_id":"38497","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"fedoraproject","cpe5":"fedora","cpe6":"38","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2023","cve_id":"38497","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"rust-lang","cpe5":"cargo","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"rust","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[{"cve":"CVE-2023-38497","qid":"199636","title":"Ubuntu Security Notification for Cargo Vulnerability (USN-6275-1)"},{"cve":"CVE-2023-38497","qid":"241946","title":"Red Hat Update for rust (RHSA-2023:4634)"},{"cve":"CVE-2023-38497","qid":"241951","title":"Red Hat Update for rust-toolset:rhel8 (RHSA-2023:4635)"},{"cve":"CVE-2023-38497","qid":"284376","title":"Fedora Security Update for rust (FEDORA-2023-6f2c7aa713)"},{"cve":"CVE-2023-38497","qid":"284410","title":"Fedora Security Update for rust (FEDORA-2023-4824704a61)"},{"cve":"CVE-2023-38497","qid":"503265","title":"Alpine Linux Security Update for rust"},{"cve":"CVE-2023-38497","qid":"505933","title":"Alpine Linux Security Update for rust"},{"cve":"CVE-2023-38497","qid":"907407","title":"Common Base Linux Mariner (CBL-Mariner) Security Update for rust (28510-1)"},{"cve":"CVE-2023-38497","qid":"941229","title":"AlmaLinux Security Update for rust (ALSA-2023:4634)"},{"cve":"CVE-2023-38497","qid":"941232","title":"AlmaLinux Security Update for rust-toolset:rhel8 (ALSA-2023:4635)"}]},"source_records":{"cve_program":{"data_version":"4.0","data_type":"CVE","data_format":"MITRE","CVE_data_meta":{"ID":"CVE-2023-38497","ASSIGNER":"security-advisories@github.com","STATE":"PUBLIC"},"description":{"description_data":[{"lang":"eng","value":"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`."}]},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"CWE-278: Insecure Preserved Inherited Permissions","cweId":"CWE-278"}]}]},"affects":{"vendor":{"vendor_data":[{"vendor_name":"rust-lang","product":{"product_data":[{"product_name":"cargo","version":{"version_data":[{"version_affected":"=","version_value":"< 0.72.2"}]}}]}}]}},"references":{"reference_data":[{"url":"https://github.com/rust-lang/cargo/security/advisories/GHSA-j3xp-wfr4-hx87","refsource":"MISC","name":"https://github.com/rust-lang/cargo/security/advisories/GHSA-j3xp-wfr4-hx87"},{"url":"https://github.com/rust-lang/cargo/pull/12443","refsource":"MISC","name":"https://github.com/rust-lang/cargo/pull/12443"},{"url":"https://github.com/rust-lang/cargo/commit/d78bbf4bde3c6b95caca7512f537c6f9721426ff","refsource":"MISC","name":"https://github.com/rust-lang/cargo/commit/d78bbf4bde3c6b95caca7512f537c6f9721426ff"},{"url":"https://en.wikipedia.org/wiki/Umask","refsource":"MISC","name":"https://en.wikipedia.org/wiki/Umask"},{"url":"https://github.com/rust-lang/wg-security-response/tree/main/patches/CVE-2023-38497","refsource":"MISC","name":"https://github.com/rust-lang/wg-security-response/tree/main/patches/CVE-2023-38497"},{"url":"https://www.rust-lang.org/policies/security","refsource":"MISC","name":"https://www.rust-lang.org/policies/security"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/QGKE6PGM4HIQUHPJRBQAHMELINSGN4H4/","refsource":"MISC","name":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/QGKE6PGM4HIQUHPJRBQAHMELINSGN4H4/"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/QMEXGUGPW5OBSQA6URTBNDSU3RAEFOZ4/","refsource":"MISC","name":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/QMEXGUGPW5OBSQA6URTBNDSU3RAEFOZ4/"}]},"source":{"advisory":"GHSA-j3xp-wfr4-hx87","discovery":"UNKNOWN"},"impact":{"cvss":[{"attackComplexity":"LOW","attackVector":"LOCAL","availabilityImpact":"NONE","baseScore":7.8,"baseSeverity":"HIGH","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"LOW","scope":"CHANGED","userInteraction":"REQUIRED","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N","version":"3.1"}]}},"nvd":{"publishedDate":"2023-08-04 16:15:00","lastModifiedDate":"2023-08-17 19:15:00","problem_types":["CWE-278"],"metrics":{"baseMetricV3":{"cvssV3":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"REQUIRED","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH","baseScore":7.3,"baseSeverity":"HIGH"},"exploitabilityScore":1.3,"impactScore":5.9}},"configurations":{"CVE_data_version":"4.0","nodes":[{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:rust-lang:cargo:*:*:*:*:*:rust:*:*","versionEndExcluding":"0.72.2","cpe_name":[]}]},{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:o:fedoraproject:fedora:38:*:*:*:*:*:*:*","cpe_name":[]}]}]}},"legacy_mitre":{"record":null,"notes":[]}}}