CVE-2022-30708
Executive Summary
CVE-2022-30708 is an unauthenticated remote code execution (RCE) vulnerability affecting Webmin versions through 1.991 when the Authentic theme is enabled. The flaw exists in the settings-editor_write.cgi script, which fails to properly restrict the file parameter, allowing an attacker to write arbitrary files to the system—ultimately leading to code execution. The vulnerability requires that a user account has been manually created in the system (i.e., not created through Virtualmin or Cloudmin), which broadens the attack surface significantly in environments where custom user accounts exist. With a CVSS score of 8.8, this vulnerability represents a critical risk to exposed Webmin instances, allowing complete system compromise. No patch is currently available, and no public proof-of-concept or exploit code has been disclosed, though the technical nature of the flaw suggests active exploitation is plausible.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Technical Analysis
The vulnerability resides in the settings-editor_write.cgi component of Webmin when the Authentic theme is active. The core issue is an improper restriction of the file parameter passed to the script. Webmin's Authentic theme provides a settings editor interface that allows administrators to modify configuration files through a web-based editor. The settings-editor_write.cgi script is responsible for writing changes back to the filesystem.
The flaw allows an attacker to specify an arbitrary file path via the file parameter, which the script then writes to without proper sanitization or validation. This constitutes a path traversal and arbitrary file write vulnerability. In a typical attack, this could be leveraged to write a malicious file to a web-accessible directory or to overwrite critical system files, including Webmin's own configuration files or cron job definitions.
The attack surface is limited to instances where:
- The Authentic theme is enabled (a popular third-party theme for Webmin)
- A user account has been manually created (not via Virtualmin or Cloudmin automation)
The requirement for a manually created user is notable—it suggests that certain authentication checks or validation paths are only present when users are created through the automated tools, and manually created users bypass some security controls. This is likely related to how the Authentic theme handles session management or file access permissions for users created through different mechanisms.
The vulnerability is classified as an arbitrary file write that can be chained into remote code execution. Because Webmin runs with elevated privileges (typically root), the ability to write arbitrary files translates directly to full system compromise. Attackers could write a Perl script to a web-accessible directory or modify system crontab entries to achieve code execution.
Insufficient technical detail is available in the public description to determine the exact request structure or the precise authentication challenge required. The vulnerability class, however, is clear: improper input validation on a file path parameter leading to arbitrary file write and subsequent code execution.
Exploitation Scenarios
Based strictly on the vulnerability description, the following attack chain is inferred:
Step 1 — Reconnaissance/Target Identification: An attacker identifies exposed Webmin instances by scanning the internet for the default Webmin port (10000) or via services banners. Tools such as Shodan or Masscan can be used to identify "Webmin" or "Authentic Theme" in HTTP response headers or page content. The attacker would then determine if the Authentic theme is active by examining the login page or by accessing default theme resources.
Step 2 — Authentication and Trigger: The vulnerability requires that a user has been manually created. An attacker must first authenticate to the Webmin instance with valid credentials. This could be achieved through weak/default credentials, credential stuffing, or phishing attacks. Once authenticated, the attacker accesses the settings editor functionality via settings-editor_write.cgi.
Step 3 — Payload/Exploitation: The attacker crafts a request to settings-editor_write.cgi with a malicious file parameter. Rather than specifying a legitimate configuration file, the attacker provides a path to a web-accessible resource or a system file that will be overwritten. For example, the attacker could target a file within the web server's document root (e.g., /usr/share/webmin/ or the theme's directory) and write a malicious CGI script or Perl module. Alternatively, the attacker could overwrite cron configuration files to establish persistence or execute commands at a scheduled interval.
The payload would be embedded in the POST request body or as a parameter value, containing malicious code—likely a Perl one-liner or a full web shell. Since Webmin is typically written in Perl and runs with root privileges, the arbitrary file write is sufficient to execute arbitrary commands with the privileges of the Webmin process.
Step 4 — Post-Exploitation: Successful exploitation results in remote code execution with the privileges of the Webmin process—typically root. The attacker can:
- Read and exfiltrate sensitive data (passwords, configuration files, or databases)
- Install persistent backdoors (via cron, startup scripts, or webshells)
- Move laterally within the network using the compromised server as a pivot point
- Deploy ransomware or cryptocurrency miners
No public PoC is available at the time of writing; the attack chain above is inferred from the vulnerability class (arbitrary file write via improper parameter restriction) and the specific component mentioned in the NVD description.
Impact Assessment
Business Impact: Critical. This vulnerability allows an unauthenticated (or minimally privileged) attacker to execute arbitrary code on the target system with root privileges. Webmin is commonly deployed on Linux servers as a management interface, meaning successful exploitation grants direct oversight of critical infrastructure. The attacker gains the ability to:
- Confidentiality breach: Access all data on the server, including credentials, application secrets, and user data.
- Integrity compromise: Modify system configuration, inject backdoors, or alter application data.
- Availability disruption: Shut down services, corrupt data, or carry out ransomware attacks.
Affected Systems: Any Webmin installation through version 1.991 with the Authentic theme enabled and at least one manually created user. This includes a substantial portion of the Webmin deployment base, as the Authentic theme is one of the most popular themes in the Webmin ecosystem.
Blast Radius: Direct compromise of the Webmin host. Given that Webmin is often deployed on servers with additional services (mail servers, web servers, database servers), the blast radius extends to all services running on the compromised host. If the server is part of a larger network, lateral movement becomes possible, potentially compromising the entire infrastructure.
CVSS Assessment (8.8 — High): The CVSS vector reflects the following:
- Attack Vector: Network — vulnerability is remotely exploitable
- Attack Complexity: Low — no special conditions beyond the required user setup
- Privileges Required: Low — only a valid user account is needed (though the NVD description suggests this might be any manually created user)
- User Interaction: None — no victim action required
- Impact: High on confidentiality, integrity, and availability
The EPSS score of 0.03586 (88.3% percentile) indicates that while a minority of CVEs are more actively exploited, this vulnerability sits well above the median in terms of exploitation likelihood, suggesting real-world attacks are occurring or imminent.
Detection Guidance
Sigma Rule
title: Webmin settings-editor_write.cgi Arbitrary File Write
id: 3f8a2b4c-5d6e-4f7a-8b9c-0d1e2f3a4b5c
status: experimental
description: Detects attempts to exploit CVE-2022-30708 in Webmin by targeting settings-editor_write.cgi with suspicious file parameters
references:
- https://nvd.nist.gov/vuln/detail/CVE-2022-30708
tags:
- attack.initial_access
- attack.t1190
- cve.2022-30708
logsource:
category: webserver
product: apache
definition: Detection of Webmin HTTP requests accessing the settings editor
detection:
selection:
cs-method: POST
cs-uri-query|contains:
- 'settings-editor_write.cgi'
cs-uri-query|re:
- 'file=\/etc\/'
- 'file=\/usr\/share\/webmin\/'
- 'file=\.\.'
- 'file=%2fetc%2f'
- 'file=%2e%2e'
condition: selection
timeframe: 5m
fields:
- clientip
- cs-uri-query
- cs-useragent
falsepositives:
- Legitimate Webmin administrative actions targeting expected configuration files
level: high
YARA Rule
rule CVE_2022_30708_Webmin_SettingsEditor
{
meta:
author = "ValtersIT Threat Intelligence"
description = "Detects exploit strings targeting Webmin settings-editor_write.cgi arbitrary file write vulnerability"
cve = "CVE-2022-30708"
date = "2024-01-01"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2022-30708"
strings:
$s1 = "settings-editor_write.cgi" ascii wide nocase
$s2 = "file=/etc/" ascii wide nocase
$s3 = "file=/var/" ascii wide nocase
$s4 = "file=../" ascii wide nocase
$s5 = "file=%2e%2e%2f" ascii wide nocase
$s6 = "file=/usr/share/webmin" ascii wide nocase
$s7 = "authentic-theme" ascii wide nocase
condition:
$s1 and any of ($s2, $s3, $s4, $s5, $s6) and $s7
}
Suricata IDS Rule
alert http any any -> $HOME_NET any (msg:"ET EXPLOIT Webmin CVE-2022-30708 Arbitrary File Write Attempt"; flow:to_server,established; content:"POST"; http_method; content:"settings-editor_write.cgi"; http_uri; pcre:"/(file=|file%3d)(%2f|/)etc/|(file=|file%3d)\.\.|(file=|file%3d)(%2f|/)usr/share/webmin/i"; sid:202230708; rev:1; metadata:created_at 2024_01_01, updated_at 2024_01_01, cve CVE_2022_30708; reference:url,nvd.nist.gov/vuln/detail/CVE-2022-30708; classtype:attempted-admin;)
Elastic Detection
sequence by source.ip with maxspan=15s
[network where protocol == "http" and
event.action in ("POST", "post") and
url.path contains "settings-editor_write.cgi" and
(
url.query contains "file=/etc/" or
url.query contains "file=../" or
url.query contains "file=%2e%2e%2f" or
url.query contains "file=/usr/share/"
)]
[process where event.action == "exec" and
process.name == "perl" and
process.command_line contains "webmin"]
Splunk SPL Query
index=web* OR index=access* OR sourcetype=apache:access
| where match(_raw, "settings-editor_write\.cgi")
| rex field=_raw "file\=(?<target_file>[^&\s]+)"
| eval target_decoded = urldecode(target_file)
| where match(target_decoded, "(?i)(/etc/|\.\.|/usr/share/webmin|/root/)")
| table _time, clientip, dest, uri_path, target_file, target_decoded, status, useragent
| stats count by _time, clientip, dest, target_decoded
| sort - _time
Wazuh OSSEC Rule
<group name="syslog,">
<rule id="100307" level="12">
<if_sid>31122</if_sid> <!-- Web server access log events -->
<match>settings-editor_write.cgi</match>
<regex>file=(/etc/|\.\.|/usr/share/webmin|%2fetc%2f|%2e%2e%2f)</regex>
<description>Webmin CVE-2022-30708 - Attempted arbitrary file write via settings editor</description>
<group>attack.initial_access,attack.t1190,cve.2022-30708</group>
<mitre>
<id>T1190</id>
</mitre>
<options>no_full_log</options>
</rule>
</group>
Mitigation & Patch Guidance
Patch Confidence: 0/4 — UNPATCHED. No patch evidence from any tracked source exists at the time of this report. The vendor has not released an official fix for this vulnerability in any tracked source, and no version number has been identified as remediating the issue.
Immediate Mitigations (to minimize risk while awaiting a vendor fix):
- Restrict access to Webmin: Use firewall rules or network segmentation to limit access to the Webmin interface (port 10000) to only trusted administrative IPs or VPN connections. This reduces the attack surface from the entire internet to authorized users only.
- Disable the Authentic theme: If the Authentic theme is not absolutely required, switch to the default Webmin theme. This immediately eliminates the vulnerable component.
- Disable manual user creation: If possible, restrict the ability to create users manually and instead mandate that all users be created via Virtualmin or Cloudmin, since the vulnerability requires a manually created user.
- Enable two-factor authentication for all Webmin accounts to reduce the risk of credential compromise that could lead to exploitation.
- Monitor logs aggressively: Deploy the detection rules provided above to identify and alert on any attempts to access
settings-editor_write.cgiwith suspicious parameters.
Patch/Upgrade Steps:
- Check the Webmin website (webmin.com) and the vendor's release announcements for a version later than 1.991 that addresses this vulnerability.
- If available, upgrade to the patched version immediately. If no patched version exists, continue monitoring the vendor's site for updates.
- Subscribe to the Webmin security advisory mailing list or monitor the project's GitHub repository for any official fix.
Long-Term Hardening:
- Network-level controls: Place Webmin behind an SSH tunnel or VPN rather than exposing it directly to the internet. If exposure is unavoidable, implement rate limiting and IP-based access controls.
- Principle of least privilege: Do not grant every user the ability to modify system settings or access the settings editor. Regularly audit user permissions and remove stale accounts.
- Vulnerability management: Integrate CVE monitoring into your security operations. Use tools like the CISA KEV catalog to track whether this vulnerability is later added, indicating active exploitation.
- Backup and recovery: Maintain regular backups of all Webmin configuration files to enable rapid recovery in the event of compromise.
- Segmentation: Ensure Webmin hosts are not accessible from all network segments. Isolate management interfaces onto dedicated management VLANs.
Additional Notes: Given the lack of a patch, organizations using Webmin with the Authentic theme are strongly encouraged to either apply workarounds or plan for a migration to an alternative management solution until an official fix is released.
References
- NVD Entry: https://nvd.nist.gov/vuln/detail/CVE-2022-30708
- Webmin Official Site: https://webmin.com/
- Webmin GitHub Repository (for patch tracking): https://github.com/webmin/webmin/
- MITRE ATT&CK Technique T1190 — Exploit Public-Facing Application: https://attack.mitre.org/techniques/T1190/
- CISA Known Exploited Vulnerabilities Catalog (to verify current KEV status): https://www.cisa.gov/known-exploited-vulnerabilities-catalog
Threat Actor Activity Notes: No confirmed threat actor campaigns have been publicly attributed to this CVE at the time of writing. The CISA KEV catalog does not currently list this vulnerability, indicating no confirmed exploitation in the wild has been officially reported. However, the high CVSS score and the EPSS percentile ranking (88.3%) suggest that exploitation is probable or underway, and organizations should treat this as an actively targeted vulnerability.
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.