GitHub Advisoryadvisory · crates.io

GHSA-98cv-wqjx-wx8f sudo-rs Allows Low Privilege Users to Discover the Existence of Files in Inaccessible Folders

LOW Published 2025-05-13 Modified 2025-05-13 Official page ↗
Aliases
CVE-2025-46717
Ecosystem
crates.io
Packages
sudo-rs
Severity
Low
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
Weaknesses
CWE-497
Reviewed
2025-05-13

Affected packages

• crates.io sudo-rs: < 0.2.6 → fixed in 0.2.6

Description

Summary Users with no (or very limited) sudo privileges can determine whether files exists in folders that they otherwise cannot access using `sudo --list `. PoC As root: ``` mkdir /tmp/foo chmod a-rwx /tmp/foo touch /tmp/foo/secret_file ``` As a user without any (or limited) sudo rights: ``` $ sudo --list /tmp/foo/nonexistent_file sudo-rs: '/tmp/foo/nonexistent_file': command not found $ $ sudo --list /tmp/foo/secret_file sudo-rs: Sorry, user eve may not run sudo on host. ``` I.e. the user can distinguish whether files exist. Related Original sudo (vulnerable version tested by us: 1.9.15p5) exhibited similar behaviour for files with the executable bit set. Impact Users with local access to a machine can discover the existence/non-existence of certain files, revealing potentially sensitive information in the file names. This information can also be used in conjunction with other attacks. Credits This issue was identified by sudo-rs developer Marc Schoolderman

Related

Alias · CVE (1)

  • CVE-2025-46717 sudo-rs is a memory safe implementation of sudo and su written in Rust. vulnerability

Weakness · CWE (1)

  • CWE-497 Exposure of Sensitive System Information to an Unauthorized Control Sphere weakness

References