Webmin 1.890 and 1.900 through 1.920 from SourceForge held a backdoor that let a remote attacker run commands as root.
The CVE is CVE-2019-15107, and the fixed versions are Webmin 1.930 and Usermin 1.780. The backdoor was in the SourceForge packages only, not in the GitHub source.
What happened
Attackers changed a script in the Webmin build, so released packages carried a hidden remote command flaw.
- Author Jamie Cameron says the development build server was compromised in April 2018.
- The flaw sat in the
oldparameter ofpassword_change.cgiand allowed command injection by an unauthenticated remote user. - It worked through the password expiry feature. The trigger was a setting named "Prompt users with expired passwords to enter a new one".
- That setting is off by default, except in version 1.890.
- A researcher disclosed it at DEF CON 27 in August 2019 without telling the developers first.
In July 2018 the attacker changed the file again, which affected 1.900. The backdoor was present for over a year before disclosure.
Affected versions
- Webmin 1.890. Exploitable with the default settings.
- Webmin 1.900 through 1.920, from SourceForge packages. These need the password expiry setting named above.
- Rapid7 reports that Usermin was also affected. Usermin 1.780 is fixed.
- Fixed in Webmin 1.930.
- Security Affairs gives a wider range of 1.882 through 1.921. If you run any Webmin from the 1.8 or 1.9 line before 1.930, upgrade.
Indicators of compromise
- Webmin version 1.890, 1.900 to 1.920, or any version from 1.882 to 1.921 that came from SourceForge.
- Requests to
/password_change.cgiwith a craftedoldparameter, from an address that is not a user. - Unexpected commands run by the root user, started by the Webmin process.
How to check
Read the installed Webmin version and check your web logs for requests to the vulnerable script. The paths can differ by distribution. A version below 1.930 needs an upgrade.
cat /etc/webmin/version; grep -h "password_change.cgi" /var/webmin/miniserv.log | tail
What to do now
- Upgrade Webmin to 1.930 or later and Usermin to 1.780 or later.
- If a bad version was reachable from the internet, assume that an attacker had root. Rebuild the server or review it fully, and rotate every credential and key on that host.
- Do not expose Webmin to the internet. Limit it to a management network.
- Turn off the password expiry prompt setting until the upgrade is done.
Frequently asked questions
How many systems were exposed?
Shodan showed more than 217,000 internet-facing Webmin systems, and about 1,400 ran 1.890.
Is the flaw exploited?
CISA lists CVE-2019-15107 as a known exploited vulnerability, according to Rapid7. A Metasploit module exists.
Sources
Send this page to the person who looks after AI at your company.