Skip to content
Access control Write-up Intermediate

CVE Deep Dive : CVE-2025–32463

Sudo versions 1.9.14 to 1.9.17 resolved paths via chroot() during policy evaluation, allowing a local user to load a malicious NSS library from a fake chroot environment with root privileges. This lets any local user escalate to root without existing sudo privileges.

medium.com

Published on medium.com

Starting with sudo version 1.9.14, sudo began resolving paths via chroot() during policy evaluation. This created a critical window where privilege checks occurred within an attacker-controlled environment, allowing malicious NSS (Name Service Switch) libraries to be loaded with root privileges before security…

Optimus_Brime, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Sudo resolved paths via chroot() during policy evaluation, so privilege checks occurred inside an attacker-controlled environment where malicious NSS libraries could be loaded with root privileges before policies were enforced.

Impact

Any local user could become root, leading to complete system access, data exposure, and potential ransomware deployment; the text notes active scanning and exploitation in the wild.

What the attacker needed

Local access to target system; ability to create files in /tmp; no sudo privileges required

The fix

The vulnerability was fixed in sudo 1.9.17p1 by moving chroot evaluation after policy checks and preventing the -R option from being used by unauthorised users.

How it was found

  1. Create a fake chroot directory with a controlled nsswitch.conf file.
  2. Place a malicious NSS library in the fake environment's lib directory.
  3. Run sudo with the -R option pointing to the fake chroot and a command.
  4. The malicious library executes with root privileges during NSS lookup.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Sudo is a program that lets users run commands as root. This bug meant that when sudo checked whether a user was allowed to run a command, it could be tricked into loading a malicious library file from a fake directory tree the attacker controlled. Because that loading happened with root power, the attacker's code ran as root, giving full control of the system.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.