Summary
Webmin contains a privilege escalation vulnerability in its group-management flow: a delegated administrator with Webmin Users module access may submit an arbitrary module list when creating or editing a group. If they can also assign themselves to that group, they may gain access to privileged modules such as Command Shell and execute commands as root.
Affected context
The issue is in Webmin's acl/save_group.cgi group-management functionality. It becomes risky when a delegated administrator can use the Webmin Users module to create or edit groups, and the submitted mod parameter is not adequately restricted to modules they are authorized to grant. If the administrator can add themselves to a group with a privileged module, that access may enable command execution as root.
Exploit preconditions
- Attack surface: Webmin's group-management interface and
acl/save_group.cgi - Required access: Access to the Webmin Users module sufficient to create or edit groups
- Trigger point: Submitting a group configuration containing unauthorized modules in the
modparameter - Additional condition: The delegated administrator can assign themselves to the resulting group
- Why exploitation is possible: Module grants are not adequately constrained by the administrator's authorization, allowing them to grant access to privileged functionality such as Command Shell
Why this happens
The underlying issue is improper privilege management (CWE-269). The group-saving flow accepts module selections without sufficiently verifying that the submitting administrator is allowed to grant each one. This creates an insecure authorization boundary: a delegated administrator can potentially grant privileges beyond their intended role.
Potential impact
- A delegated administrator may gain access to modules they are not authorized to use.
- Access to a privileged module such as Command Shell could allow commands to be executed as root.
- Webmin-managed systems may be exposed to unauthorized changes or further compromise.
General mitigation guidance
Defensive patterns focus on enforcing authorization at the point where group privileges are saved.
- Restrict module grants to an explicit allowlist based on the acting administrator's permissions.
- Prevent administrators from granting themselves privileges beyond their assigned role.
- Apply least-privilege defaults to delegated accounts and group membership.
- Validate and authorize each requested module on the server side rather than trusting submitted form values.
- Separate sensitive administrative capabilities from routine user and group management.
How teams detect issues like this
Review authorization logic in group-management handlers, especially checks performed when processing submitted module lists. Static analysis and code review can look for user-controlled privilege assignments that lack per-module authorization checks. Audit Webmin group changes and investigate unexpected grants of sensitive modules, changes made by delegated accounts, or self-assignment to newly privileged groups. Policy checks can require explicit approval for grants of high-impact capabilities.

