Incorrect default permissions in Cargo - CVE-2023-38497

 

Incorrect default permissions in Cargo - CVE-2023-38497

Published: August 3, 2023 / Updated: August 4, 2023


Vulnerability identifier: #VU78930
CSH Severity: Low
CVSS v4: 8.4 [CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N]
CVE-ID: CVE-2023-38497
CWE-ID: CWE-276
Exploitation vector: Local access
Exploit availability: Public exploit is available

Vulnerability details

The vulnerability allows a local user to escalate privileges on the system.

The vulnerability exists due to Cargo does not respect the umask when extracting crate archives on UNIX-like systems. A local user can change the source code compiled and executed by the current user.


Affected software

Cargo
Oracle Solaris
Amazon Linux AMI
Gentoo Linux
SUSE Linux Enterprise High Performance Computing 15
SUSE Linux Enterprise Desktop 15
SUSE Linux Enterprise Real Time 15
SUSE Linux Enterprise Server 15
SUSE Linux Enterprise Server for SAP Applications 15
SUSE Manager Retail Branch Server
SUSE Manager Proxy
SUSE Manager Server
Fedora
Red Hat Enterprise Linux for Power, little endian
Anolis OS
Red Hat Enterprise Linux for x86_64
Red Hat Enterprise Linux for ARM 64
Red Hat Enterprise Linux for IBM z Systems
Red Hat Enterprise Linux for ARM 64 - Extended Update Support
Red Hat Enterprise Linux Server - TUS
Red Hat Enterprise Linux for Power, little endian - Extended Update Support
Red Hat Enterprise Linux for IBM z Systems - Extended Update Support
Red Hat Enterprise Linux Server - AUS
Red Hat Enterprise Linux for x86_64 - Extended Update Support
Development Tools Module
openSUSE Leap
Ubuntu
openEuler
tar-rs
Red Hat Enterprise Linux Server for Power LE - Update Services for SAP Solutions
cargo (Ubuntu package)
librust-cargo+openssl-dev (Ubuntu package)
librust-cargo-dev (Ubuntu package)
rust (Red Hat package)
rust-src
cargo
rust-lldb
rust-gdb
rust-debugger-common
rustfmt
rust-toolset
rust-std-static-wasm32-wasi
rust-std-static-wasm32-unknown-unknown
rust-std-static
rust-doc
rust-analyzer
rust-analysis
rust
clippy
rust-toolset-1.66-rust (Red Hat package)
dev-lang/rust-bin
dev-lang/rust
cargo1.71
cargo1.71-debuginfo
rust1.71-debuginfo
rust1.71
rust1.71-test
rust-debuginfo
rust-debugsource
rust-help

How to mitigate CVE-2023-38497

Install updates from vendor's website.

Oracle Solaris - update to 11.4 SRU 71
tar-rs - update to 0.4.39
cargo (Ubuntu package) - update to Ubuntu Pro
librust-cargo+openssl-dev (Ubuntu package) - update to Ubuntu Pro
librust-cargo-dev (Ubuntu package) - update to Ubuntu Pro
rust (Red Hat package) - addressed in versions 1.58.1-1.el9_0.1, 1.66.1-2.el9_2
rust-src - addressed in versions 1.66.1-2, 1.71.1-2
cargo - addressed in versions 1.66.1-2, 1.71.1-2
rust-lldb - addressed in versions 1.66.1-2, 1.71.1-2
rust-gdb - addressed in versions 1.66.1-2, 1.71.1-2
rust-debugger-common - addressed in versions 1.66.1-2, 1.71.1-2
rustfmt - addressed in versions 1.66.1-2, 1.71.1-2
rust-toolset - addressed in versions 1.66.1-2, 1.71.1-2
rust-std-static-wasm32-wasi - addressed in versions 1.66.1-2, 1.71.1-2
rust-std-static-wasm32-unknown-unknown - addressed in versions 1.66.1-2, 1.71.1-2
rust-std-static - addressed in versions 1.66.1-2, 1.71.1-2
rust-doc - addressed in versions 1.66.1-2, 1.71.1-2
rust-analyzer - addressed in versions 1.66.1-2, 1.71.1-2
rust-analysis - update to 1.66.1-2
rust - addressed in versions 1.66.1-2, 1.71.1-2
clippy - addressed in versions 1.66.1-2, 1.71.1-2
rust-toolset-1.66-rust (Red Hat package) - update to 1.66.1-2.el7_9
rust - update to 1.68.2-1
dev-lang/rust-bin - update to 1.71.1
dev-lang/rust - update to 1.71.1
rust - addressed in versions 1.71.1-1.el7, 1.71.1-1.fc37, 1.71.1-1.fc38
cargo1.71 - update to 1.71.1-150400.9.6.1
cargo1.71-debuginfo - update to 1.71.1-150400.9.6.1
rust1.71-debuginfo - update to 1.71.1-150400.9.6.1
rust1.71 - update to 1.71.1-150400.9.6.1
rust1.71-test - update to 1.71.1-150400.9.6.1
rust-debugger-common - update to 1.76.0-1
rust - update to 1.76.0-1
cargo - update to 1.76.0-1
clippy - update to 1.76.0-1
rust-analyzer - update to 1.76.0-1
rust-debuginfo - update to 1.76.0-1
rust-debugsource - update to 1.76.0-1
rust-help - update to 1.76.0-1
rust-std-static - update to 1.76.0-1
rustfmt - update to 1.76.0-1
rust-gdb - update to 1.76.0-1
rust-lldb - update to 1.76.0-1
rust-src - update to 1.76.0-1

Links to Public Exploits and PoC-codes

External References

Related Security Bulletins