Lucene search

K
ubuntucveUbuntu.comUB:CVE-2023-38497
HistoryAug 03, 2023 - 12:00 a.m.

CVE-2023-38497

2023-08-0300:00:00
ubuntu.com
ubuntu.com
11
cargo
rust
arbitrary code execution
umask
unix-like systems
security vulnerability

7.9 High

CVSS3

Attack Vector

LOCAL

Attack Complexity

LOW

Privileges Required

LOW

User Interaction

REQUIRED

Scope

CHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

NONE

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

0.0004 Low

EPSS

Percentile

5.1%

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.

Notes

Author Note
sbeattie cargo in mantic was merged into rustc
alexmurray requires an update to the tar rust dependency (tar 0.4.39) - this is packaged as rust-tar in Ubuntu but only the rust-cargo package appears to use this - rustc and cargo both vendor a copy of this package
litios a workaround for this issue is to prevent access to the ~/.cargo directory to other users.
OSVersionArchitecturePackageVersionFilename
ubuntu18.04noarchcargo< 0.66.0+ds0ubuntu0.libgit2-0ubuntu0.18.04.1~esm1UNKNOWN
ubuntu20.04noarchcargo< 0.67.1+ds0ubuntu0.libgit2-0ubuntu0.20.04.2+esm1UNKNOWN
ubuntu22.04noarchcargo< 0.67.1+ds0ubuntu0.libgit2-0ubuntu0.22.04.2+esm1UNKNOWN
ubuntu16.04noarchcargo< 0.47.0-1~exp1ubuntu1~16.04.1+esm1UNKNOWN
ubuntu22.04noarchrust-cargo< 0.57.0-1ubuntu0.1~esm1UNKNOWN
ubuntu23.10noarchrust-cargo< anyUNKNOWN
ubuntu24.04noarchrust-cargo< anyUNKNOWN
ubuntu23.10noarchrustc< anyUNKNOWN
ubuntu24.04noarchrustc< anyUNKNOWN

7.9 High

CVSS3

Attack Vector

LOCAL

Attack Complexity

LOW

Privileges Required

LOW

User Interaction

REQUIRED

Scope

CHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

NONE

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

0.0004 Low

EPSS

Percentile

5.1%