CVE-2025-32463: Sudo - Local Privilege Escalation via chroot
- Template: CVE-2025-32463
- Name: Sudo - Local Privilege Escalation via chroot
- Description: Sudo before 1.9.17p1 allows local users to obtain root access by using /etc/nsswitch.conf from a user-controlled directory with the --chroot (-R) option.
- Impact: A local attacker can escalate privileges to root by placing a crafted nsswitch.conf file and a malicious NSS library in a writable chroot directory, enabling arbitrary code execution with root privileges.
- Remediation: Upgrade sudo to version 1.9.17p1 or later.
- Severity: critical
- Authors: SeungAh-Hong
- Tags: cve, cve2025, sudo, priv-esc, linux, lpe, kev, vkev
- References: https://nvd.nist.gov/vuln/detail/CVE-2025-32463, https://www.sudo.ws/security/advisories/chroot_bug/, https://ubuntu.com/security/CVE-2025-32463, https://www.wiz.io/vulnerability-database/cve/cve-2025-32463, https://explore.alas.aws.amazon.com/CVE-2025-32463.html
- Cves: CVE-2025-32463
- Verified: yes
- Directory: code/cves
- Path: code/cves/2025/CVE-2025-32463.yaml
- Digest: 4b0a00483046022100f7e2db7b9f030f5e7e2ca51b366480c254afd8ac506a915a2d87245660de9f30022100ba391fe88278a2ac62048efe1cf20c0b2e8b73c06762d477642e76064d5569b1
- Created at: 2026-03-30T08:43:47Z
- Updated at: 2026-11-22T02:03:55Z
- Age in days: 239
- Template url: https://github.com/projectdiscovery/nuclei-templates/blob/main/code/cves/2025/CVE-2025-32463.yaml
- Checked, none or zero: products
- Not known: max requests
Classification
- Cwe: CWE-426
- Cvss score: 9.3
- Cvss vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
- Epss score: 0.563
- Epss percentile: 0.99074
- Not known: cpe
Metadata
- Verified: yes
Labels
- Name: Sudo - Privilege Escalation
- Impact: Local users can gain root access, leading to full system compromise.
- Remediation: Update to version 1.9.17p1 or later.
- Vulnerability type: broken_access_control
- Vulnerability impact: privilege_escalation
- Requirement type: logged_in
- Requirements: Attacker must have local user privileges.
- Labels source: projectdiscovery
- From cve: CVE-2025-32463
```yaml
id: CVE-2025-32463
info:
name: Sudo - Local Privilege Escalation via chroot
author: SeungAh-Hong
severity: critical
description: |
Sudo before 1.9.17p1 allows local users to obtain root access by using /etc/nsswitch.conf from a user-controlled directory with the --chroot (-R) option.
impact: |
A local attacker can escalate privileges to root by placing a crafted nsswitch.conf file and a malicious NSS library in a writable chroot directory, enabling arbitrary code execution with root privileges.
remediation: |
Upgrade sudo to version 1.9.17p1 or later.
reference:
- https://nvd.nist.gov/vuln/detail/CVE-2025-32463
- https://www.sudo.ws/security/advisories/chroot_bug/
- https://ubuntu.com/security/CVE-2025-32463
- https://www.wiz.io/vulnerability-database/cve/cve-2025-32463
- https://explore.alas.aws.amazon.com/CVE-2025-32463.html
classification:
cve-id: CVE-2025-32463
epss-score: 0.563
epss-percentile: 0.99074
cvss-score: 9.3
cvss-metrics: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
cwe-id: CWE-426
metadata:
verified: true
tags: cve,cve2025,sudo,priv-esc,linux,lpe,kev,vkev
self-contained: true
flow: code(1) && code(2)
code:
- engine:
- sh
- bash
source: |
whoami
matchers:
- type: word
part: response
words:
- "root"
negative: true
internal: true
- engine:
- sh
- bash
source: |
OUT="$(sudo -n -R woot woot 2>&1 || true)"
printf "%s\n" "$OUT"
matchers-condition: and
matchers:
- type: regex
part: response
regex:
- '(?i).*woot.*no such file or directory.*'
- type: dsl
dsl:
- "!contains(tolower(response), 'password')"
- "!contains(tolower(response), 'a password is required')"
- "!contains(tolower(response), 'is not in the sudoers file')"
digest: 4b0a00483046022100f7e2db7b9f030f5e7e2ca51b366480c254afd8ac506a915a2d87245660de9f30022100ba391fe88278a2ac62048efe1cf20c0b2e8b73c06762d477642e76064d5569b1:922c64590222798bb761d5b6d8e72950
```