
本项目基于 Docker 搭建了一个用于复现和测试 sudo 本地权限提升漏洞 CVE-2025-32463 的实验环境。

This project builds an experimental environment based on Docker for reproducing and testing the sudo local privilege escalation vulnerability CVE-2025-32463. The image contains the affected version of sudo, along with exploit scripts and auxiliary tools, suitable for security researchers and learners to practice analysis.
🐳 The image has been published to Docker Hub and can be pulled directly:
Pull either version of the image and run it locally;
docker run -it --rm y4ney/cve-2025-32463-lab:source bash
Or
docker run -it --rm y4ney/cve-2025-32463-lab:deb bash
Execute the PoC script in the working directory. The script can take any command as argument; if no command is provided, it opens an interactive bash shell by default;
./sudo-chwoot.sh id
./sudo-chwoot.sh
Since we added the --rm parameter when starting the container, the container will be automatically destroyed after exiting the container environment with exit. To delete the image, run the following commands.
docker rmi y4ney/cve-2025-32463-lab:source
Or
docker rmi y4ney/cve-2025-32463-lab:deb

Clone the project
git clone https://github.com/y4ney/CVE-2025-32463-lab.git
cd cve-2025-32463-lab
Enter the docker directory and run the build script:
cd docker
./build.sh <your-docker-hub-name>
The script will build the following images:
<your-docker-hub-name>/cve-2025-32463-lab:deb: Environment with the affected version built from official .deb packages<your-docker-hub-name>/cve-2025-32463-lab:source: Environment built from source, suitable for debugging and source code analysisStart the container and enter an interactive terminal:
docker run -it --rm <your-docker-hub-name>/cve-2025-32463-lab:source bash
Or
docker run -it --rm <your-docker-hub-name>/cve-2025-32463-lab:deb bash
Run the exploit script inside the container:
./sudo-chwoot.sh
If the exploit is successful, you will obtain root privileges inside the container.
Make sure the following tools are installed and configured on your system:
.sh scripts)chmod +x *.sh to add themThis project is licensed under the MIT open source license. Feel free to use and modify it.
| File / Directory | Description |
|---|
| docker/deb/Dockerfile | sudo installed via deb package |
| docker/source/Dockerfile | sudo compiled from source |
| docker/sudo-chwoot.sh | Exploit script to trigger sudo's chroot privilege bypass and obtain a root shell |
| docker/build.sh | Helper script to build all Docker images with one command |
| Discussion on Container Isolation Security of chroot from CVE-2025-32463 | Learning document |