Skip to content
RCE Write-up Intermediate

CVE-2019-15107: RCE in Webmin

A backdoor was planted in Webmin's build infrastructure, causing official downloads from SourceForge to contain malicious code in versions 1.882 through 1.921. An unauthenticated attacker could execute arbitrary commands as root if the password change feature was enabled, and Webmin 1.890 was vulnerable by default.

pentest.com.tr

Published on pentest.com.tr

Vendor fixed this vulnerability. Webmin must update to the 1.930 version.

The author, on pentest.com.tr

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely a backdoor in the build infrastructure caused the password_change.cgi script to pass the 'old' parameter to a shell command without sanitisation, allowing command injection.

Impact

An unauthenticated attacker could execute arbitrary commands with root privileges if the password change module was enabled; Webmin 1.890 was vulnerable in the default configuration.

What the attacker needed

Password change feature enabled (default in 1.890); network access to Webmin on port 10000

The fix

The vulnerability was fixed in Webmin version 1.930.

How it was found

  1. Enable the 'Prompt users with expired passwords to enter a new one' option in Webmin configuration.
  2. Send a POST request to password_change.cgi with a crafted 'old' parameter containing a vertical bar and a command.
  3. The server executes the command and returns the output.
  4. Send a reverse shell payload to gain a shell session.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Webmin is a tool for managing Unix servers. A hidden backdoor was added to some official downloads, letting anyone run commands on the server without logging in, as long as a certain password-change setting was turned on. The developers fixed it by releasing a new version.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.