CVE-2025-46718: Sudo rs Sudo-rs Allows Low Privilege Users Vulnerability

LOW
Advisory Identifier: GHSA-w9q3-g4p5-5q2r
CVSS 3.3
CWE-497
Published
Advisory Summary

CVE-2025-46718 is a LOW (CVSS 3.3) sudo-rs allows low privilege users vulnerability (CWE-497: Exposure of Sensitive System Information to an Unauthorized Control Sphere) affecting Sudo rs libraries in the crates.io ecosystem. The issue involves sudo-rs allows low privilege users to enumerate privileges of others. Remediation is available by upgrading affected packages to version 0.2.6.

CVE-2025-46718 at a Glance

CVE Identifier CVE-2025-46718
GHSA Identifier GHSA-w9q3-g4p5-5q2r
Severity LOW
CVSS v3.1 Base Score 3.3
CWE Classification CWE-497: Exposure of Sensitive System Information to an Unauthorized Control Sphere
Affected Product Sudo rs
Package Ecosystem crates.io
Published Date
Last Updated

Security Impact

CVSS: 3.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2025-46718

To remediate this vulnerability, upgrade all affected Sudo rs dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

sudo-rs fixed: 0.2.6
Upgrade sudo-rs to 0.2.6
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for sudo-rs

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-46718, inspect your project dependencies for Sudo rs:

inspect dependencies for sudo-rs

Analyze the terminal output to locate any version of Sudo rs in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.2.6), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-497: Exposure of Sensitive System Information to an Unauthorized Control Sphere, where the product does not properly prevent sensitive system-level information from being accessed by unauthorized actors who do not have the same level of access to the underlying system as the product does. In Sudo rs, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary Users with limited sudo privileges (e.g. execution of a single command) can list sudo privileges of other users using the `-U` flag. This doesn't happen with the original sudo. ### PoC The initial test has been done in a container running Ubuntu 24.04 and installing [oxidizr](https://github.com/jnsgruk/oxidizr), running sudo-rs 0.2.2. A user (bob) has been added with only ps command executable through sudo: ``` root ALL=(ALL:ALL) ALL bob ALL=(ALL:ALL) /usr/bin/ps ``` The user is not able to read the `/etc/sudoers` file and running `sudo -l -Uroot` with original sudo (version 1.9.15p5) causes the following error: ``` Sorry, user bob is not allowed to execute 'list' as root on 43d4aed3cdbd. ``` The same command with sudo-rs is run without denying the execution: ``` User root may run the following commands on 43d4aed3cdbd: (ALL : ALL) ALL ``` The same happens for other non-root users: ``` bob@43d4aed3cdbd:~$ sudo -l -Ufoo User foo may run the following commands on 43d4aed3cdbd: (ALL : ALL) /usr/bin/whoami ``` The behavior has been also been observed for version 0.2.5. ### Impact Users with limited sudo privileges can enumerate the sudoers file, revealing sensitive information about other users' permissions. Attackers can collect information that can be used to more targeted attacks. Systems where users either do not have sudo privileges or have the ability to run all commands as root through sudo (the default configuration on most systems) are not affected by this advisory. ### Credits This issue was identified by [Sonia Zorba](https://www.zonia3000.net/).

CVE-2025-46718 Affected Sudo rs Versions

1 component(s)
Fixed Versions:
0.2.6
Product / Package Ecosystem Affected Versions Fixed Version
sudo-rs
crates.io
< 0.2.6
0.2.6

References

Frequently Asked Questions

What is CVE-2025-46718?
CVE-2025-46718 is a security vulnerability in Sudo rs involving sudo-rs Allows Low Privilege Users to Enumerate Privileges of Others under CWE-497: Exposure of Sensitive System Information to an Unauthorized Control Sphere.
Which Sudo rs versions are affected?
Affected versions include releases prior to 0.2.6 across affected packages: sudo-rs.
What version fixes CVE-2025-46718?
Upgrading to 0.2.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is sudo-rs affected?
Yes, sudo-rs is affected in releases prior to 0.2.6. Upgrade your dependency to 0.2.6 or later.
What is the CVSS score of CVE-2025-46718?
CVE-2025-46718 has a CVSS v3.1 base score of 3.3 (LOW) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2025-46718?
CVE-2025-46718 is classified under CWE-497: Exposure of Sensitive System Information to an Unauthorized Control Sphere (The product does not properly prevent sensitive system-level information from being accessed by unauthorized actors who do not have the same level of access to the underlying system as the product does.).
How can I check crates.io dependencies for CVE-2025-46718?
Run the dependency tree command: 'inspect dependencies for sudo-rs'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-w9q3-g4p5-5q2r",
  "modified" : "2025-05-13T20:05:55Z",
  "published" : "2025-05-13T20:05:55Z",
  "aliases" : [ "CVE-2025-46718" ],
  "summary" : "sudo-rs Allows Low Privilege Users to Enumerate Privileges of Others",
  "details" : "### Summary\nUsers with limited sudo privileges (e.g. execution of a single command) can list sudo privileges of other users using the `-U` flag. This doesn't happen with the original sudo.\n\n### PoC\n\nThe initial test has been done in a container running Ubuntu 24.04 and installing [oxidizr](https://github.com/jnsgruk/oxidizr), running sudo-rs 0.2.2.\n\nA user (bob) has been added with only ps command executable through sudo:\n\n```\nroot    ALL=(ALL:ALL) ALL\nbob     ALL=(ALL:ALL) /usr/bin/ps\n```\n\nThe user is not able to read the `/etc/sudoers` file and running `sudo -l -Uroot` with original sudo (version 1.9.15p5) causes the following error:\n\n```\nSorry, user bob is not allowed to execute 'list' as root on 43d4aed3cdbd.\n```\n\nThe same command with sudo-rs is run without denying the execution:\n\n```\nUser root may run the following commands on 43d4aed3cdbd:\n    (ALL : ALL) ALL\n```\n\nThe same happens for other non-root users:\n\n```\nbob@43d4aed3cdbd:~$ sudo -l -Ufoo\nUser foo may run the following commands on 43d4aed3cdbd:\n    (ALL : ALL) /usr/bin/whoami\n```\n\nThe behavior has been also been observed for version 0.2.5.\n\n### Impact\nUsers with limited sudo privileges can enumerate the sudoers file, revealing sensitive information about other users' permissions. Attackers can collect information that can be used to more targeted attacks.\n\nSystems where users either do not have sudo privileges or have the ability to run all commands as root through sudo (the default configuration on most systems) are not affected by this advisory.\n\n### Credits\nThis issue was identified by [Sonia Zorba](https://www.zonia3000.net/).",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "sudo-rs"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.2.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/trifectatechfoundation/sudo-rs/security/advisories/GHSA-w9q3-g4p5-5q2r"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-46718"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/trifectatechfoundation/sudo-rs"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/trifectatechfoundation/sudo-rs/releases/tag/v0.2.6"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-497" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-05-13T20:05:55Z",
    "nvd_published_at" : "2025-05-12T15:16:01Z"
  }
}