GHSA-98cv-wqjx-wx8f

Suggest an improvement
Source
https://github.com/advisories/GHSA-98cv-wqjx-wx8f
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/05/GHSA-98cv-wqjx-wx8f/GHSA-98cv-wqjx-wx8f.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-98cv-wqjx-wx8f
Aliases
Related
Published
2025-05-13T14:08:18Z
Modified
2025-05-13T14:42:23.745285Z
Downstream
Severity
  • 3.3 (Low) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N CVSS Calculator
Summary
sudo-rs Allows Low Privilege Users to Discover the Existence of Files in Inaccessible Folders
Details

Summary

Users with no (or very limited) sudo privileges can determine whether files exists in folders that they otherwise cannot access using sudo --list <pathname>.

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

Database specific
{
    "nvd_published_at": "2025-05-12T15:16:01Z",
    "cwe_ids": [
        "CWE-497"
    ],
    "severity": "LOW",
    "github_reviewed": true,
    "github_reviewed_at": "2025-05-13T14:08:18Z"
}
References

Affected packages

crates.io / sudo-rs

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.2.6

Database specific

{
    "last_known_affected_version_range": "<= 0.2.5"
}