Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1020 CNY

100%

CVE-2025-32463 PoC — Sudo 安全漏洞

Source
Associated Vulnerability
Title:Sudo 安全漏洞 (CVE-2025-32463)
Description:Sudo before 1.9.17p1 allows local users to obtain root access because /etc/nsswitch.conf from a user-controlled directory is used with the --chroot option.
Description
PoC for CVE-2025-32463: Local privilege escalation in sudo via --chroot. Exploits NSS module injection through crafted chroot environments. Designed for security researchers and lab-only environments.
Readme
# CVE-2025-32463_Sudo_PoC
PoC for CVE-2025-32463: Local privilege escalation in sudo via --chroot. Exploits NSS module injection through crafted chroot environments. Designed for security researchers and lab-only environments.

# CVE-2025-32463 - Local Privilege Escalation via `sudo --chroot`

> A Python-based proof-of-concept exploit for CVE-2025-32463 — a local privilege escalation vulnerability in `sudo` (v1.9.14 - v1.9.17).  
> This exploit leverages the insecure `--chroot` option in `sudo` and malicious NSS resolution to execute code as `root`.

---

## ⚠️ Disclaimer

This code is provided **strictly for educational and research purposes only**.  
**Do NOT use on production systems** or without explicit authorization.  
You are solely responsible for complying with applicable laws and policies.

---

## 📖 Vulnerability Overview

**CVE-2025-32463** is a local privilege escalation flaw in `sudo`, introduced by its `--chroot` (`-R`) functionality.  
If a user is allowed to invoke `sudo` with the `-R` flag, they can:

- Create a custom chroot environment
- Inject a fake `nsswitch.conf`
- Load malicious `libnss_Xfiles.so.2`
- Trigger a constructor payload when `sudo` resolves user info — running code as `root`

---

## 🧰 Requirements

- Python 3
- `gcc` (for compiling the shared object payload)
- A vulnerable `sudo` binary (v1.9.14 ≤ version < v1.9.17p1)
- A system where `sudo` allows the use of `--chroot` (e.g., via `sudoers`)

Tested on:
- Ubuntu 22.04
- CentOS 8.4 (with downgraded `sudo`)
- Debian 11

---

## 🚀 Usage

```bash
git clone https://github.com/yourhandle/CVE-2025-32463-poc.git
cd CVE-2025-32463-poc
python3 exploit.py [-v]

File Snapshot

[4.0K] /data/pocs/ded442a90079696ecbaede4c561b3f7c222d3699 ├── [1.0K] LICENSE ├── [2.7K] PoC.py └── [1.6K] README.md 0 directories, 3 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →