Skip to main content
Mallory
MediumPublic exploitVulnerability

CVE-2012-2982: Authenticated command injection in Webmin file/show.cgi

Published Sep 11, 2012 · Updated 1 month ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS6.5Medium · v2
EPSS61.9%99th percentile
CISA KEVNoNot listed
In the wildNonePublic exploit, no exploitation reported
Vendor
Gentoo
IdentifiersCVE-2012-2982CWE-77

CVE-2012-2982 is a command injection vulnerability in file/show.cgi in Webmin 1.590 and earlier. The flaw is caused by improper neutralization of shell metacharacters in a pathname parameter; an invalid character such as the pipe (|) can be injected into the pathname and interpreted by the underlying command execution context. As a result, a remote authenticated user can cause arbitrary system commands to be executed. Available advisory context indicates the commands may run as a privileged user, and CERT/CC notes that previously established sessions can also be abused via embedded HTML, such as IMG SRC tags in HTML email, to trigger command execution on the server.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation allows an authenticated attacker to execute arbitrary operating system commands on the Webmin host. Advisory context indicates execution may occur with elevated privileges, potentially root or another privileged Webmin context. This can lead to full compromise of the managed system, including unauthorized administrative actions, data access, modification or destruction of files, installation of persistence mechanisms, and use of the host for further lateral movement. If a valid session is already established, cross-site request style delivery via embedded HTML may also cause command execution without the victim intentionally interacting with Webmin directly.

Mitigation

If you can’t patch tonight, do this now.

Restrict Webmin access to trusted administrative hosts and networks only, as recommended by the advisory. Reduce exposure by firewalling the interface, limiting source IPs, disabling unnecessary remote access, and enforcing strong authentication hygiene to reduce the chance of credential theft. Because exploitation requires authentication or an existing session, protect administrator sessions from reuse and avoid accessing Webmin from untrusted contexts where session theft or forced requests are possible.

Remediation

Patch, then assume compromise.

Upgrade Webmin to a version that includes the fix for CVE-2012-2982. The referenced patch for this issue is Webmin commit 1f1411fe7404ec3ac03e803cfa7e01515e71a213. If immediate upgrade is not possible, apply the vendor patch from the Webmin development branch referenced by the advisory and then move to an official fixed release as soon as available. Validate that file/show.cgi no longer permits shell metacharacters in pathname handling after patching.

Public exploits

Exploits

5 exploits validated by Mallory's analysis. Hidden: 2 rejected by Mallory's analysis as not a working exploit.

View more in app →
webmin_show_cgi_exec.rbThis repository contains a single Metasploit module (Ruby file) that exploits an authenticated remote command execution vulnerability in Webmin 1.580, specifically in the /file/show.cgi component. The exploit requires valid credentials for a user with access to the File Manager module. The module first authenticates to Webmin via the /session_login.cgi endpoint, retrieves a session cookie, and then exploits the vulnerability by sending a crafted request to /file/show.cgi that injects arbitrary system commands. The payload is customizable and supports various command execution methods (generic, perl, ruby, python, telnet). If successful, the exploit provides root-level command execution on the target system. The code is weaponized, as it is part of the Metasploit framework and allows for easy payload customization. The repository is structured as a single Ruby file under the typical Metasploit module path.Disclosed Sep 6, 2012 · Framework: metasploit · ruby · networkWeaponizedCVE-2012-2982This repository contains a Python exploit script (CVE-2012-2982.py) targeting Webmin version 1.580, specifically exploiting a remote code execution vulnerability via the /file/show.cgi endpoint (CVE-2012-2982). The exploit requires valid Webmin credentials and allows the attacker to execute a single arbitrary command on the target server. The script first logs in to Webmin using the provided credentials, then crafts a GET request to the vulnerable endpoint, injecting the command for execution. The repository is simple, containing only the exploit script and a README. The README clarifies that this is a standalone Python implementation of the exploit, not relying on Metasploit. The main entry point is CVE-2012-2982.py, which takes command-line arguments for the target, port, credentials, and command to execute. The exploit is operational and demonstrates the vulnerability effectively.JohnHammond · Disclosed Sep 4, 2021 · python · networkOperationalCVE-2012-2982This repository contains a single Python exploit script (CVE-2012-2982.py) targeting Webmin installations vulnerable to CVE-2012-2982. The exploit works by first authenticating to the target Webmin instance using provided credentials, then exploiting a command injection vulnerability in the 'file/show.cgi' endpoint to execute arbitrary shell commands. The payload is a bash reverse shell that connects back to the attacker's specified IP and port. The script requires the attacker to provide the target's address, valid credentials, and the attacker's listener details. The rest of the repository consists of IDE configuration files and .gitignore entries, with no impact on the exploit's functionality. The exploit is operational and provides a working reverse shell if the target is vulnerable and the credentials are valid.lpuv · Disclosed Mar 14, 2025 · python · networkOperationalCVE-2012-2982-Webmin-ExploitThis repository contains a Python proof-of-concept exploit for CVE-2012-2982, a remote authenticated command execution vulnerability in Webmin 1.590 and earlier. The exploit targets the /file/show.cgi endpoint, which is vulnerable to command injection via unsanitized user input. The exploit script automates authentication to Webmin, retrieves a session ID, and sends a malicious request that injects a bash reverse shell payload. The payload connects back to the attacker's machine (default port 1937, configurable) using a TCP reverse shell. The attacker must have valid Webmin credentials and set up a netcat listener to receive the shell. The repository includes a README with detailed usage instructions, prerequisites, and references. The main code file is 'cve-2012-2982-exploit.py', written in Python, and is modular for easy modification. No framework is used; this is a standalone PoC exploit.SieGer05 · Disclosed Mar 5, 2025 · python · networkPoCCVE-2012-2982-Webmin-RCEThis repository contains a Python proof-of-concept exploit for CVE-2012-2982, targeting Webmin version 1.580. The exploit leverages an authenticated remote command execution vulnerability in the file/show.cgi component, allowing an attacker with valid credentials to execute arbitrary OS commands as root. The repository consists of a README.md with detailed usage instructions and vulnerability background, and a single exploit script (webmin.py). The script authenticates to the target Webmin instance using provided credentials, then crafts a malicious GET request to the vulnerable endpoint, injecting the user-supplied command via unsanitized input. The exploit is network-based, requires authentication, and does not hardcode payloads, instead allowing the user to specify any command. No fake or detection-only code is present; this is a functional PoC exploit.JRrooot · Disclosed Jan 5, 2026 · python · networkPoC
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
GentooWebminapplication
FAQ

Frequently asked questions

Is CVE-2012-2982 exploited in the wild?
As of Oct 16, 2026, Mallory has no reports of CVE-2012-2982 being exploited in the wild. It is not listed in CISA KEV.
Is there a public exploit for CVE-2012-2982?
Yes. Mallory tracks 5 public exploits or proofs of concept for CVE-2012-2982, the earliest disclosed Sep 6, 2012.
Is there a patch for CVE-2012-2982?
Upgrade Webmin to a version that includes the fix for CVE-2012-2982. The referenced patch for this issue is Webmin commit 1f1411fe7404ec3ac03e803cfa7e01515e71a213.
What products are affected by CVE-2012-2982?
Gentoo Webmin.
How severe is CVE-2012-2982?
CVE-2012-2982 has a CVSS v2 score of 6.5 (Medium) and an EPSS score of 61.9% (99th percentile) as of Oct 16, 2026.
Activity feed

Recent activity

1 sources tracked across advisories and community write-ups. News coverage will land here when it surfaces.

View more in app →

No news coverage yet. Advisories and community discussion only.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malwareMalware families linked to this CVE, with evidence and IOCs.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activityCommunity discussion across Reddit, Mastodon, and other social sources.