{"id":"CVE-2025-46718","aliases":["CVE-2025-46718","GHSA-w9q3-g4p5-5q2r"],"related":[],"kind":"vulnerability","state":"published","title":"sudo-rs Allows Low Privilege Users to Enumerate Privileges of Others","summary":"sudo-rs is a memory safe implementation of sudo and su written in Rust. Prior to version 0.2.6, users with limited sudo privileges (e.g. execution of a single command) can list sudo privileges of other users using the `-U` flag. This vulnerability allows users with limited sudo privileges to 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. Version 0.2.6 fixes the vulnerability.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"sudo-rs is a memory safe implementation of sudo and su written in Rust. Prior to version 0.2.6, users with limited sudo privileges (e.g. execution of a single command) can list sudo privileges of other users using the `-U` flag. This vulnerability allows users with limited sudo privileges to 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. Version 0.2.6 fixes the vulnerability.","source":"cvelist"},{"lang":"en","text":"### 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/).","format":"markdown","source":"ghsa"},{"lang":"es","text":"sudo-rs es una implementación de memoria segura de sudo y su, escrita en Rust. Antes de la versión 0.2.6, los usuarios con privilegios de sudo limitados (por ejemplo, la ejecución de un solo comando) podían listar los privilegios de sudo de otros usuarios mediante la opción `-U`. Esta vulnerabilidad permite a los usuarios con privilegios de sudo limitados enumerar el archivo `sudoers`, revelando información confidencial sobre los permisos de otros usuarios. Los atacantes pueden recopilar información que puede utilizarse para ataques más específicos. Los sistemas donde los usuarios no tienen privilegios de sudo o pueden ejecutar todos los comandos como root mediante sudo (la configuración predeterminada en la mayoría de los sistemas) no se ven afectados por este aviso. La versión 0.2.6 corrige la vulnerabilidad.","source":"nvd"}],"published":"2025-05-12T14:54:24.925Z","modified":"2026-09-10T03:50:24.683Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","score":3.3,"rating":"LOW"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","score":3.3,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","score":3.3,"rating":"LOW"}],"cwes":["CWE-497"],"affected":[{"ranges":[{"version":"< 0.2.6","status":"affected"}],"vendor":"trifectatechfoundation","product":"sudo-rs","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.2.6"}],"ecosystem":"crates.io","package":"sudo-rs","purl":"pkg:cargo/sudo-rs","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"0.2.6"}],"vendor":"trifectatech","product":"sudo","cpe":"cpe:2.3:a:trifectatech:sudo:*:*:*:*:*:rust:*:*","source":"nvd"}],"references":[{"url":"https://github.com/trifectatechfoundation/sudo-rs/security/advisories/GHSA-w9q3-g4p5-5q2r","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/trifectatechfoundation/sudo-rs/releases/tag/v0.2.6","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-46718","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/trifectatechfoundation/sudo-rs","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2025-05-12T21:45:01.523Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-46718","url":"https://www.cve.org/CVERecord?id=CVE-2025-46718","licence":"CVE Terms of Use","modified":"2025-05-12T22:06:49.474Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-w9q3-g4p5-5q2r","url":"https://github.com/advisories/GHSA-w9q3-g4p5-5q2r","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:24.683Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-46718","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-46718","licence":"Public domain","modified":"2026-06-17T09:26:52.053Z"}],"updatedAt":"2026-11-25T22:58:57.914Z","epss":{"score":0.00271,"percentile":0.20854,"date":"2026-12-01T12:00:22.000Z"}}