CVE-2025-64517

CVE-2025-64517 is a medium-severity improper authentication vulnerability in sudo-rs (rust), affecting versions >= 0.2.5, < 0.2.10. It is fixed in 0.2.10.

Summary

When Defaults targetpw (or Defaults rootpw) is enabled, the password of the target account (or root account) instead of the invoking user is used for authentication. sudo-rs prior to 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.

Example

With this in /etc/sudoers:

Defaults targetpw
user ALL=(ALL:ALL) ALL

First run:

user@machine$ sudo -g root whoami
[sudo: authenticate] Password: <password for user>
user

Then run:

user@machine$ sudo -u root whoami
root

Affected versions

sudo-rs prior to 0.2.5 are not affected, since they do not offer Defaults targetpw or Defaults rootpw.

Credits

This issue was discovered and reported by @Pingasmaster.

Impact

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.

The application does not adequately verify the identity of a user, device, or process before granting access. Typical impact: unauthorized access to functions or data reserved for authenticated parties.

CVE-2025-64517 has a CVSS score of 4.4 (Medium). The vector is requires local access, high privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.2.10); upgrading removes the vulnerable code path.

Affected versions

sudo-rs (>= 0.2.5, < 0.2.10)

Security releases

sudo-rs → 0.2.10 (rust)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

Upgrade sudo-rs to 0.2.10 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2025-64517? CVE-2025-64517 is a medium-severity improper authentication vulnerability in sudo-rs (rust), affecting versions >= 0.2.5, < 0.2.10. It is fixed in 0.2.10. The application does not adequately verify the identity of a user, device, or process before granting access.
  2. How severe is CVE-2025-64517? CVE-2025-64517 has a CVSS score of 4.4 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of sudo-rs are affected by CVE-2025-64517? sudo-rs (rust) versions >= 0.2.5, < 0.2.10 is affected.
  4. Is there a fix for CVE-2025-64517? Yes. CVE-2025-64517 is fixed in 0.2.10. Upgrade to this version or later.
  5. Is CVE-2025-64517 exploitable, and should I be worried? Whether CVE-2025-64517 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2025-64517 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2025-64517? Upgrade sudo-rs to 0.2.10 or later.

Other vulnerabilities in sudo-rs

CVE-2025-64517CVE-2025-64170CVE-2025-46718CVE-2025-46717

Stop the waste.
Protect your environment with Kodem.