Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. cargo
  4. ›
  5. CVE-2023-38497

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

August 3, 2023

The Rust Security Response WG was notified that Cargo 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.

This vulnerability has been assigned CVE-2023-38497.

References

  • en.wikipedia.org/wiki/Umask
  • github.com/advisories/GHSA-j3xp-wfr4-hx87
  • github.com/rust-lang/cargo
  • github.com/rust-lang/cargo/commit/d78bbf4bde3c6b95caca7512f537c6f9721426ff
  • github.com/rust-lang/cargo/pull/12443
  • github.com/rust-lang/cargo/security/advisories/GHSA-j3xp-wfr4-hx87
  • github.com/rust-lang/wg-security-response/tree/main/patches/CVE-2023-38497
  • lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/QGKE6PGM4HIQUHPJRBQAHMELINSGN4H4
  • lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/QMEXGUGPW5OBSQA6URTBNDSU3RAEFOZ4
  • nvd.nist.gov/vuln/detail/CVE-2023-38497
  • www.rust-lang.org/policies/security

Code Behaviors & Features

Detect and mitigate CVE-2023-38497 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.72.2

Fixed versions

  • 0.72.2

Solution

Upgrade to version 0.72.2 or above.

Impact 7.9 HIGH

CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-278: Insecure Preserved Inherited Permissions
  • CWE-732: Incorrect Permission Assignment for Critical Resource

Source file

cargo/cargo/CVE-2023-38497.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:51 +0000.