CVE-2025-64517: Sudo rs Sudo-rs Doesn't Record Authenticating User Vulnerability

MODERATE
Advisory Identifier: GHSA-q428-6v73-fc4q
CVSS 4.4
CWE-287
Published
Advisory Summary

CVE-2025-64517 is a MODERATE (CVSS 4.4) sudo-rs doesn't record authenticating user vulnerability (CWE-287: Improper Authentication) affecting Sudo rs libraries in the crates.io ecosystem. The issue involves sudo-rs doesn't record authenticating user properly in timestamp. Remediation is available by upgrading affected packages to version 0.2.10.

CVE-2025-64517 at a Glance

CVE Identifier CVE-2025-64517
GHSA Identifier GHSA-q428-6v73-fc4q
Severity MODERATE
CVSS v3.1 Base Score 4.4
CWE Classification CWE-287: Improper Authentication
Affected Product Sudo rs
Package Ecosystem crates.io
Published Date
Last Updated

Security Impact

CVSS: 4.4

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

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

How to Fix CVE-2025-64517

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.10
Upgrade sudo-rs to 0.2.10
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-64517, 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.10), 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-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. 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 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. ### 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. ### 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.

CVE-2025-64517 Affected Sudo rs Versions

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

References

Frequently Asked Questions

What is CVE-2025-64517?
CVE-2025-64517 is a security vulnerability in Sudo rs involving sudo-rs doesn't record authenticating user properly in timestamp under CWE-287: Improper Authentication.
Which Sudo rs versions are affected?
Affected versions include releases prior to 0.2.10 across affected packages: sudo-rs.
What version fixes CVE-2025-64517?
Upgrading to 0.2.10 (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.10. Upgrade your dependency to 0.2.10 or later.
What is the CVSS score of CVE-2025-64517?
CVE-2025-64517 has a CVSS v3.1 base score of 4.4 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2025-64517?
CVE-2025-64517 is classified under CWE-287: Improper Authentication (When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.).
How can I check crates.io dependencies for CVE-2025-64517?
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-q428-6v73-fc4q",
  "modified" : "2025-11-13T15:36:03Z",
  "published" : "2025-11-13T15:36:03Z",
  "aliases" : [ "CVE-2025-64517" ],
  "summary" : "sudo-rs doesn't record authenticating user properly in timestamp",
  "details" : "### Summary\nWhen `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.\n\n### Impact\nA 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.\n\nA 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.\n\n### Example\n\nWith this in /etc/sudoers:\n```\nDefaults targetpw\nuser ALL=(ALL:ALL) ALL\n```\nFirst run:\n```\nuser@machine$ sudo -g root whoami\n[sudo: authenticate] Password: <password for user>\nuser\n```\nThen run:\n```\nuser@machine$ sudo -u root whoami\nroot\n```\n\n### Affected versions\n\nsudo-rs prior to 0.2.5 are not affected, since they do not offer `Defaults targetpw` or `Defaults rootpw`.\n\n### Credits\n\nThis issue was discovered and reported by @Pingasmaster.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "sudo-rs"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.2.5"
      }, {
        "fixed" : "0.2.10"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/trifectatechfoundation/sudo-rs/security/advisories/GHSA-q428-6v73-fc4q"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-64517"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/trifectatechfoundation/sudo-rs/commit/8423fd986c3fa58b357f238c0db5e54baca5255d"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/trifectatechfoundation/sudo-rs"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/trifectatechfoundation/sudo-rs/releases/tag/v0.2.10"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-287" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-11-13T15:36:03Z",
    "nvd_published_at" : "2025-11-12T22:15:50Z"
  }
}