CVE-2026-134641 in Webmin
Summary
by MITRE • 11/25/2026
Webmin through 2.670 contains a stored cross-site scripting vulnerability in minecraft/save_backup.cgi that allows local attackers with write access to the Minecraft server directory to inject script via unescaped world directory names. Attackers can create a world directory containing HTML or script that executes in a Webmin user's session when they run Backup Now.
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 vulnerability resides within the backup functionality of Webmin, specifically affecting versions up through 2.670. This flaw is classified as a stored cross-site scripting (XSS) issue located in the minecraft/save_backup.cgi module. The root cause stems from insufficient input validation and sanitization when handling world directory names associated with Minecraft server instances managed by Webmin. When an administrator or user initiates a backup operation, the system processes these directory names without properly escaping special characters that have meaning in HTML contexts. This lack of encoding allows malicious actors to inject executable script payloads directly into the application's response stream if they can control the naming convention of the world directories.
The exploitation vector for this vulnerability requires local access with write privileges to the Minecraft server directory on the host system. An attacker who has gained such access, perhaps through a compromised account or another lateral movement technique within the same environment, can create a new world directory with a name containing malicious HTML or JavaScript code. Because Webmin stores these names and subsequently renders them in its web interface during backup operations without sanitization, the injected scripts become part of the page content served to other users. This transforms what might seem like a local file system issue into a significant cross-site scripting risk that impacts all users accessing the Webmin console who trigger or view backups involving the tainted directory.
The operational impact of this vulnerability is severe due to its stored nature and potential for session hijacking. When an authorized user, such as a server administrator, navigates to the backup section and executes a backup command, their browser parses the malicious script embedded in the world name. Since Webmin typically relies on cookies or other session identifiers for authentication, executing arbitrary JavaScript within this context allows attackers to steal sensitive session tokens, credentials, or multi-factor authentication codes. This can lead to full account compromise, enabling further lateral movement across systems managed by Webmin. Additionally, depending on browser security policies and the specific payload used, attackers could potentially perform actions on behalf of the victim, such as modifying configurations, exfiltrating data from other modules, or defacing the interface.
From a classification perspective, this vulnerability aligns with CWE-79, which covers Improper Neutralization of Input During Web Page Generation commonly known as Cross-site Scripting (XSS). The specific mechanism involves stored XSS where malicious content is saved on the target server and later retrieved by victims. In terms of adversary tactics, this maps to ATT&CK technique T1059 Command and Control via Application Layer Protocol or more specifically T1189 Drive-by Client for initial access if combined with social engineering, but primarily it facilitates post-exploitation activities like Credential Access (T1078) and Collection (T1005) once the session is hijacked. The vulnerability highlights a critical gap in how third-party modules handle user-supplied data that eventually gets rendered back to users without proper context-aware encoding.
Mitigation strategies should focus on both immediate remediation and long-term architectural improvements. Users running Webmin versions prior to 2.671 must upgrade immediately as this issue has been addressed in subsequent releases through improved input sanitization routines within the minecraft module. For environments where upgrading is not instantly feasible, administrators can implement a workaround by restricting write access to Minecraft server directories strictly to trusted service accounts and auditing directory names for special characters such as angle brackets or quotes that are commonly used in XSS payloads. Additionally, deploying a Web Application Firewall (WAF) with rules tuned to detect script injection patterns in URL parameters and form submissions may provide an additional layer of defense against exploitation attempts. Regular security audits of custom modules and adherence to secure coding standards like OWASP Top Ten guidelines can prevent similar vulnerabilities from being introduced into the application ecosystem.