Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2025-64517: CWE-287: Improper Authentication in trifectatechfoundation sudo-rs

0
Medium
VulnerabilityCVE-2025-64517cvecve-2025-64517cwe-287
Published: Wed Nov 12 2025 (11/12/2025, 22:08:29 UTC)
Source: CVE Database V5
Vendor/Project: trifectatechfoundation
Product: sudo-rs

Description

sudo-rs is a memory safe implementation of sudo and su written in Rust. With `Defaults targetpw` (or `Defaults rootpw`) enabled, the password of the target account (or root account) instead of the invoking user is used for authentication. sudo-rs starting in version 0.2.5 and prior to version 0.2.10 incorrectly recorded the invoking user’s UID instead of the authenticated-as user's UID in the authentication timestamp. Any later `sudo` invocation on the same terminal while the timestamp was still valid would use that timestamp, potentially bypassing new authentication even if the policy would have required it. A highly-privileged user (able to run commands as other users, or as root, through sudo) who knows one password of an account they are allowed to run commands as, would be able to run commands as any other account the policy permits them to run commands for, even if they don't know the password for those accounts. A common instance of this would be that a user can still use their own password to run commands as root (the default behaviour of `sudo`), effectively negating the intended behaviour of the `targetpw` or `rootpw` options. Version 0.2.10 contains a patch for the issue. Versions prior to 0.2.5 are not affected, since they do not offer `Defaults targetpw` or `Defaults rootpw`.

AI-Powered Analysis

AILast updated: 11/12/2025, 22:32:37 UTC

Technical Analysis

CVE-2025-64517 is a vulnerability in sudo-rs, a Rust-based memory-safe implementation of sudo and su, specifically affecting versions from 0.2.5 up to but not including 0.2.10. The vulnerability arises when sudo-rs is configured with 'Defaults targetpw' or 'Defaults rootpw', which are intended to require the password of the target account (or root) rather than the invoking user for authentication. Due to a logic flaw, sudo-rs incorrectly records the invoking user's UID in the authentication timestamp instead of the authenticated target user's UID. This timestamp is used to bypass repeated authentication prompts within a valid time window. Consequently, a user with high privileges who knows the password of one allowed target account can exploit the timestamp to run commands as any other account allowed by the sudo policy without knowing their passwords. This effectively negates the security benefit of the 'targetpw' or 'rootpw' options, allowing privilege escalation and unauthorized command execution. The flaw does not affect versions prior to 0.2.5, which lack these options, and was fixed in version 0.2.10. The vulnerability has a CVSS 3.1 score of 4.4, indicating medium severity, with local attack vector, low attack complexity, high privileges required, no user interaction, and impact limited to integrity. No known exploits are reported in the wild. The issue is classified under CWE-287 (Improper Authentication).

Potential Impact

For European organizations, this vulnerability poses a risk of privilege escalation and unauthorized command execution on systems running affected versions of sudo-rs with 'targetpw' or 'rootpw' enabled. Attackers with high privileges and knowledge of one target account password can bypass intended authentication controls to execute commands as other privileged accounts, including root. This undermines the security model of sudo-rs and can lead to unauthorized access to sensitive data, system configuration changes, and potential lateral movement within networks. Organizations relying on sudo-rs for privilege delegation in critical infrastructure, government, finance, or healthcare sectors may face increased risk of insider threats or compromised administrative accounts. The local attack vector and requirement for high privileges limit remote exploitation but do not eliminate risk from malicious insiders or compromised accounts. The medium severity rating reflects the moderate impact and exploitation complexity, but the potential for significant integrity violations in sensitive environments remains.

Mitigation Recommendations

1. Upgrade sudo-rs to version 0.2.10 or later, where the vulnerability is patched. 2. Audit all systems using sudo-rs to identify affected versions and configurations with 'Defaults targetpw' or 'Defaults rootpw'. 3. Temporarily disable 'targetpw' and 'rootpw' options if upgrading is not immediately feasible, understanding this may alter authentication behavior. 4. Implement strict access controls and monitoring on accounts with sudo privileges to detect unusual command execution patterns. 5. Employ multi-factor authentication for privileged accounts to reduce risk of password compromise. 6. Review and tighten sudo policies to limit the number of accounts a user can run commands as, minimizing the attack surface. 7. Conduct regular security training for administrators on the risks of privilege escalation and proper sudo configuration. 8. Use system integrity monitoring to detect unauthorized changes resulting from exploitation attempts. 9. Maintain up-to-date inventories of sudo-rs deployments and configurations to ensure timely vulnerability management.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2025-11-05T21:15:39.400Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 691509abe6b3e50d509f11d4

Added to database: 11/12/2025, 10:26:51 PM

Last enriched: 11/12/2025, 10:32:37 PM

Last updated: 11/12/2025, 11:31:10 PM

Views: 4

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats