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

Goal: 1000 CNY · Raised: 1336 CNY

100%

CVE-2012-2982 PoC — Webmin ‘file/show.cgi’任意命令执行漏洞

Source
Associated Vulnerability
Title:Webmin ‘file/show.cgi’任意命令执行漏洞 (CVE-2012-2982)
Description:file/show.cgi in Webmin 1.590 and earlier allows remote authenticated users to execute arbitrary commands via an invalid character in a pathname, as demonstrated by a | (pipe) character.
Description
A short and sweet simple exploit script for the CVE-2012-2982 Authenticated RCE vulnerability in the /file/show.cgi/bin endpoint.
Readme
# CVE-2012-2982-Exploit-Script
A short and sweet simple exploit script for the CVE-2012-2982 Authenticated RCE vulnerability in the /file/show.cgi/bin endpoint.


# Webmin RCE Exploit — CVE-2012-2982

This repository contains a Python proof-of-concept exploit for **Webmin <= 1.580**, targeting a known remote code execution vulnerability via the `/file/show.cgi/bin/` endpoint.

---

## 📌 Description

The exploit abuses unauthenticated shell command injection through crafted URLs, leveraging the `session_login.cgi` and `file/show.cgi/bin/` endpoints. If login credentials are valid and the target is vulnerable, an injected reverse shell payload is executed.

---

## ⚙️ Requirements

- Python 3.x
- `requests` library
- Netcat (for reverse shell listener)

---

## 🚀 Usage

### Run the exploit:

```bash
python3 exploit.py
````

### Start a listener BEFORE running exploit:

```bash
nc -lvnp <your-port>
```

---

## 🧠 Notes

* Payload defaults to a `bash -i` reverse shell.
* A trailing `|` in the injected payload is critical for successful execution.
* Tested against Webmin 1.580. Will likely work on versions previous.

---

## 🔒 Disclaimer

For educational and authorized testing use **only**.
Unauthorized use of this exploit is illegal and unethical. For which i take no responsibility.
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 →