CVE-2026-134633 in Webmin
Summary
by MITRE • 11/25/2026
Webmin through 2.670 contains a stored cross-site scripting vulnerability in init/mass_systemd.cgi that prints unescaped journalctl output when a systemd service fails to start. Attackers can inject script into the journal via logger or sshd invalid user names, executing it in an administrator's Webmin session.
VulDB is the best source for vulnerability data and more expert information about this specific topic.
Analysis
by VulDB Data Team • 11/25/2026
The identified security flaw resides within the Webmin administrative interface, specifically affecting versions up through 2.670. This vulnerability is classified as a stored cross-site scripting issue located in the init/mass_systemd.cgi module. The core technical deficiency involves the improper handling of output generated by journalctl when a systemd service fails to initialize or start correctly. Instead of sanitizing or escaping special characters within this log data before rendering it in the web interface, Webmin directly injects the raw content into the HTML response sent to the client browser. This lack of input validation and output encoding creates a persistent vector for malicious script injection that remains active until the underlying service logs are cleared or overwritten.
The operational mechanism of exploitation relies on the attacker's ability to manipulate system log entries, which serve as the payload source. An adversary can achieve this through two primary vectors: utilizing the logger command-line utility to write arbitrary strings directly into the systemd journal, or by triggering authentication failure messages via SSH connections using crafted invalid usernames. When an administrator subsequently accesses the Webmin interface and navigates to a section that triggers the execution of mass_systemd.cgi, such as viewing service status or logs, the system retrieves these tainted log entries. Because the output is not escaped, any JavaScript code embedded within the journal entry is interpreted and executed by the browser in the context of the administrator's active session. This persistence distinguishes it from reflected XSS attacks, as the malicious payload does not need to be delivered via a specific link or request but waits passively for an administrative user to view the affected page.
The impact of this vulnerability is significant due to its potential for full account compromise within the Webmin environment. Since the script executes with the privileges and context of the logged-in administrator, attackers can perform actions equivalent to those authorized for that role. This includes modifying system configurations, installing or removing software packages, managing user accounts, and potentially executing arbitrary commands on the underlying operating system if further privilege escalation paths exist within Webmin's own functionality. The attack does not require physical access but rather network-level reachability to either inject logs via SSH or logger, assuming the attacker has some level of interaction with the target host’s logging subsystem or can influence authentication attempts that populate the journal.
From a classification perspective, this vulnerability aligns with CWE-79, which describes Improper Neutralization of Input During Web Page Generation commonly known as Cross-site Scripting (XSS). Specifically, it represents stored XSS where malicious content is saved on the target server and later served to other users. In terms of offensive security frameworks, this maps to ATT&CK technique T1059 Command and Scripting Interpreter for initial access or lateral movement if combined with further exploitation, but more directly relates to T1189 Drive-by Client Side Web Traffic in the context of browser-based execution, although here it is triggered by administrative action rather than passive browsing. The persistence aspect also touches upon techniques involving log injection to maintain footholds or evade detection depending on how the logs are monitored.
Mitigation strategies should prioritize immediate patching to a version of Webmin released after 2.670 where this input validation issue has been resolved. Administrators must ensure that all components within their infrastructure, particularly those interacting with system services and logging mechanisms, are updated to prevent exploitation through journalctl output. In environments where upgrading is not immediately feasible, network-level controls such as web application firewalls may help detect or block requests containing script-like patterns in parameters related to service management logs, though this is less effective for stored payloads already present in the database. Additionally, restricting access to Webmin interfaces via strong authentication and IP whitelisting reduces the attack surface by limiting who can trigger the rendering of these vulnerable pages. Regular auditing of systemd journal contents and implementing strict logging policies that sanitize or restrict special characters in log entries can also serve as a defensive layer against this specific injection vector.