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

Goal: 1000 CNY · Raised: 1325 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
Technical examination of CVE-2025-32463 by Muhammed Kaya. 
Readme
CVE-2025-32463 Exploit --- Proof-of-Concept (PoC)
===============================================

> **DISCLAIMER:**\
> This repository contains a **proof-of-concept** intended only for **educational, defensive research, and authorized penetration testing**.\
> Do **NOT** use this code on systems you do not own or do not have explicit written permission to test. Unauthorized use is **illegal** and may result in criminal or civil penalties. The author assumes no liability for any misuse of this material.

Description
-----------

This PoC demonstrates a local privilege-escalation issue tracked as **CVE-2025-32463**. The vulnerability can allow a local, unprivileged user to obtain root privileges by influencing `sudo`'s use of configuration or library resolution within a chroot-like environment. The code included in this repository is for verifying and hardening systems in controlled lab environments only.

Affected Versions
-----------------

`sudo` versions prior to **1.9.17p1** (or equivalent vendor-patched releases) are known to be vulnerable. Confirm the exact affected package names and versions with your distribution vendor/security advisory.

Requirements
------------

-   Isolated, offline test environment (VM or container that you own).

-   A build toolchain if testing PoC compilation (`gcc`, `make`) when applicable.

-   Familiarity with system administration, chroot concepts, and secure testing practices.

Testing Guidance
------------------------

-   **Do not run** the PoC on production systems or systems you do not own.

-   Perform testing only in an isolated lab VM or disposable environment. Snapshot the VM before testing so you can restore it.

-   If you are a system owner verifying patch status, check your `sudo` package version and apply vendor patches rather than relying on PoC removal. Patching is the recommended remediation.

Mitigations & Recommendations
-----------------------------

-   **Patch immediately**: install vendor-supplied updates that upgrade `sudo` to **1.9.17p1** or later (or the equivalent security update for your distribution).

-   Avoid allowing untrusted users to populate or control chroot directories used by `sudo`. Ensure chroot directories are owned and writable only by administrators.

-   Ensure system configuration files (e.g., `/etc/nsswitch.conf`) and shared libraries are not referenced from user-writable locations.

-   Apply filesystem hardening (mount options like `noexec`, `nosuid`, where appropriate) and enforce strict ownership/permissions on configuration files.

-   Minimize `sudo` privileges in `sudoers` and prefer least-privilege operation models.

-   Use integrity monitoring and log monitoring to detect anomalous `sudo` activity.

Safe disclosure & responsible handling
--------------------------------------

If you discover further issues, follow responsible disclosure practices: contact the vendor, allow reasonable time for a fix, and avoid public disclosure that enables widespread exploitation before fixes are available. When publishing PoCs, prioritize defensive guidance and avoid publishing step-by-step exploit playbooks that would enable abuse.

Contact / Contributions
-----------------------

Contributions are welcome but must follow a defensive, non-actionable disclosure approach. Submit issues or pull requests that improve detection, mitigation, or safe testing guidance only.

Usage
-----------------------

```bash
chmod +x poc.sh && bash poc.sh
```

File Snapshot

Log in to view the POC file snapshot cached by Shenlong Bot

Log in to view
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 →