CVE-2026-134649 in Webmin
Summary
by MITRE • 11/25/2026
Webmin through 2.670 contains a stored cross-site scripting vulnerability in logrotate/force.cgi that prints logrotate -f diagnostic output without HTML escaping. Local OS users can create files with script-laden names in wildcard-rotated log directories, executing script in the Webmin session when Force Log Rotation is clicked.
If you want to get best quality of vulnerability data, you may have to visit VulDB.
Analysis
by VulDB Data Team • 11/25/2026
The identified vulnerability resides within the Webmin administrative interface, specifically affecting versions up to 2.670, and targets the force.cgi module responsible for managing log rotation tasks. This component exhibits a classic stored cross-site scripting flaw caused by insufficient input validation and output encoding when rendering diagnostic information from the system utility logrotate. When an administrator initiates a forced log rotation through the Webmin interface, the application retrieves execution results or status messages generated by the underlying operating system command and displays them directly within the web page without applying necessary HTML entity escaping. This failure to sanitize user-controllable data before injection into the DOM allows for the insertion of malicious script payloads that will execute in the context of any user viewing the output, thereby compromising the integrity and confidentiality of the administrative session.
The attack vector leverages a specific interaction between local operating system file naming conventions and the web application's rendering engine. An attacker with local OS access can exploit this by creating files within directories managed by wildcard-based log rotation configurations. By assigning filenames that contain executable JavaScript code, such as script tags or event handlers, the attacker ensures that these malicious strings are captured in the output of the logrotate utility when it processes those specific logs. Since Webmin displays this diagnostic output directly to the user interface without sanitization, any administrator who clicks the Force Log Rotation button will trigger the execution of the embedded scripts within their browser session. This mechanism effectively bridges the gap between local file system access and remote code execution via the web application, turning a simple logging operation into a potent attack surface for session hijacking or administrative takeover.
From an operational impact perspective, this vulnerability poses significant risks to systems relying on Webmin for server management. Successful exploitation allows attackers to perform actions as the authenticated administrator, including modifying system configurations, installing backdoors, exfiltrating sensitive data such as credentials and private keys, or pivoting to other internal network resources. The stored nature of the payload means that the malicious code persists in the log files until they are rotated or deleted, providing a persistent threat vector against any administrative user who interacts with the interface during this window. This is particularly dangerous in environments where multiple administrators share access credentials or where automated monitoring tools might inadvertently trigger the display of these logs, potentially affecting non-interactive users as well.
The technical classification of this flaw aligns closely with CWE-79, which defines Improper Neutralization of Input During Web Page Generation commonly known as Cross-site Scripting (XSS). Specifically, it represents a stored variant where malicious content is saved on the target server and subsequently served to other users. In terms of adversary tactics, this vulnerability facilitates techniques associated with ATT&CK ID T1059, Command and Scripting Interpreter, by allowing an attacker to execute arbitrary code within the context of a trusted application. It also relates to CWE-20, Improper Input Validation, as the system fails to adequately filter or encode special characters in filenames before processing them through the web interface layer.
Mitigation strategies should focus on both immediate remediation and long-term architectural improvements. The primary defense is to upgrade Webmin to version 2.671 or later, where this specific input validation flaw has been addressed by implementing proper HTML escaping for all dynamic content rendered in the logrotate diagnostic output. In addition to upgrading, administrators should enforce strict file naming policies on servers running vulnerable versions, prohibiting special characters and script-like strings in filenames within wildcard-rotated directories. Implementing a Web Application Firewall with rules capable of detecting and blocking XSS payloads can provide an additional layer of defense by intercepting malicious requests before they reach the application logic. Furthermore, adopting Content Security Policy headers that restrict inline script execution can mitigate the impact if such vulnerabilities are discovered in future versions, ensuring that even if scripts are injected into the DOM, they cannot execute without explicit whitelisting.