Vulnerabilities

Vulnerability · CVE-2023-42456

sudo-rs: Path Traversal vulnerability

Published Nov 1, 2023 · catalog updated Oct 13, 2026 · sudo-rs: Path Traversal

Check if you run it

No confirmed exploitation is on record for CVE-2023-42456. EPSS is 0.63%. Act only if a listed version of sudo-rs: Path Traversal is installed.

Gaps on this record

  • The stored product name is a package slug. The name on this page is taken from the title (sudo-rs: Path Traversal).
  • No vendor fix or required action is stored. Compare the linked advisory before you change production.
Severity
Low3.1
Known exploitation
Not in CISA/VulnCheck KEV
EPSS
0.63%
Remediation
Advisory link
Affected products
crates.io sudo-rs

## Impact An issue was discovered where usernames containing the . and / characters could result in the corruption of specific files on the filesystem. As usernames are generally not limited by the characters they can contain, a username appearing to be a relative path can be constructed. For example we could add a user to the system containing the username ../../../../bin/cp. When logged in as a user with that name, that user could run sudo -K to clear their session record file. The session code then constructs the path to the session file by concatenating the username to the session file storage directory, resulting in a resolved path of /bin/cp. The code then clears that file, resulting in the cp binary effectively being removed from the system. An attacker needs to be able to login as a user with a constructed username. Given that such a username is unlikely to exist on an existing system, they will also need to be able to create the users with the constructed usernames. ## Patches The bug is fixed in version 0.2.1 of sudo-rs. Sudo-rs now uses the uid for the user instead of their username for determining the filename. Note that an upgrade to this version will result in existing session files being ignored and users will be forced to re-authenticate. It also fully eliminates any possibility of path traversal, given that uids are always integer values. The issue was corrected in commit .

Are you affected?

Enter the version you run. The result uses only the ranges stored on this record.

The check returns affected, not affected, or incomplete. It does not guess a version that is missing from the record.

  • crates.io sudo-rs0.0.0-0 → 0.2.1

How to fix CVE-2023-42456

What to do

Three questions, each answered from this record only. Confirm the vendor advisory before you patch.

Should you patch?

No confirmed exploitation is on record for CVE-2023-42456. EPSS is 0.63%. Act only if a listed version of sudo-rs: Path Traversal is installed.

Which versions are affected?

Compare what you have installed with 0.0.0-0 → 0.2.1. Compare the installed version with the linked vendor advisory before you change production.

What should an analyst verify?

No weakness class is stored. EPSS 0.63%. There is no CISA KEV listing. No Exploit-DB or Metasploit reference is linked. Use the source links for the original advisory.

Code

The project this record applies to. Exploit listings stay in References.

Timeline

Detection, updates, and resolution for this record.

  1. Nov 1, 2023 · Catalog

    Detected

    ## Impact An issue was discovered where usernames containing the . and / characters could result in the corruption of specific files on the filesystem. As usernames are generally not limited by the characters they can contain, a username appearing to be a relative path can be constructed. For example we could add a user to the system containing the username ../../../../bin/cp. When logged in as a

  2. Oct 13, 2026 · Catalog

    Fix available

    crates.io sudo-rs 0.0.0-0 → 0.2.1

  3. Oct 13, 2026 · GitHub Advisory Database

    Fix available

    sudo-rs fixed in 0.2.1

  4. Oct 13, 2026 · GitHub Advisory Database

    Fix available

    sudo-rs fixed in 0.2.1

  5. Oct 13, 2026 · Catalog

    Updated

    ## Impact An issue was discovered where usernames containing the . and / characters could result in the corruption of specific files on the filesystem. As usernames are generally not limited by the characters they can contain, a username appearing to be a relative path can be constructed. For example we could add a user to the system containing the username ../../../../bin/cp. When logged in as a

Sources

References

Freshness

Last verified in this catalog Oct 16, 2026. Significant claims (KEV, EPSS, CVSS, affected ranges) come from the source rows above — open the original publisher for the authoritative advisory.