The security problems that bite people in 99% of cases have nothing to do with Virtualmin or any of the services it manages. They are:
- Out of date software. If you aren’t regularly updating your systems, you are probably vulnerable to known exploits.
- Weak/re-used passwords.
- Random apps and plugins with no security or maintenance history to judge them by. This is not merely a problem in PHP or WordPress land. The Node JS ecosystem makes it wildly easy to pull in thousands of unaudited dependencies…and developers do it without even thinking about it.
This question is almost always coming at it from the wrong end of the problem: Security is not a feature or product, it’s a process.
That said, tools can help. Virtualmin provides 2FA (if you enable/use it), brute-force protection for everything in the stack (even for services that don’t have it by default, we setup fail2ban), password policy (if you choose to use it), indicators for when your passwords are strong (or you can randomly generate a strong password), and it shows you available system updates every time you login and provides a UI for upgrading, either selectively or all at once, easily. Virtualmin also sets up a default firewall that prohibits all but itself and the services it manages and ssh, and you can customize is as you need. A firewall by itself is of almost not use in a web hosting system (after all, the ports you need have to be open, and the ports you don’t need shouldn’t have services running on them! and a web server should not be routing, in the general case), but with fail2ban or similar active monitoring tool, it can help prevent some kinds of attack…or, at the very least keep your access logs less busy with brute force attacks, so you can more readily spot other problems.
Virtualmin can’t protect you against web apps that have security bugs, which is the biggest source of exploit on a Virtualmin system. But, it can protect you against that user being able to do (much of) anything to other users or the system itself. By default Virtualmin runs web apps as the user that owns the domain; if their web app is exploited, the attacker can only access that users files and databases, not much of anything else. An attacker could potentially DoS the system or send spam as the user they’ve taken over.
And, in terms of security bugs in Virtualmin/Webmin itself, our security history is public and pretty good, certainly competitive with the best web hosting control panels and miles ahead of the worst (I don’t actively track cPanel or Plesk, but when they have big security bugs it comes to my attention, and it happens to them sometimes, just like it has occasionally happened to us). Actively maintained software is a big part of security, and we’ve been actively maintaining these projects for about 20 (Virtualmin) and 25 years (Webmin). There are new releases regularly, and they get a lot of security researcher attention because they’re so widely used and have such a high potential (they perform many actions as root
, by necessity, Webmin is a juicy target).
Also, the software we’ve selected to install and configure as part of the default installation (Apache or nginx, Postfix, Mariadb, Dovecot, Firewalld, Fail2ban, ClamAV, etc.) is also good on all these counts. Security and active maintenance was a big consideration, moreso than features or cutting edge tech (most of our users don’t need amazing performance or infinite scalability…and many are going to be very casual/lazy about updates and security, so we lean toward old, popular, well-documented, easy to configure, and proven over the new hotness). If it’s not in the standard OS repos for all of our supported OSes, we’re inclined to find an alternative, though there are a few exceptions because RHEL has a pretty small standard OS repo, so we also allow EPEL packages into the mix (for ProFTPd, ClamAV, and a couple of others).
Our defaults are suitable for most shared hosting systems with reasonably trusted users. i.e., if you know who your customers are, they’ve agreed to terms of service and provide billing details, they are probably not going to try to exploit the system with DoS and spam and such (and if they do, you have non-technical remedies, like canceling their service and banning them from using your service in the future). You should not offer a default Virtualmin system domain account to completely untrusted users, though (i.e. don’t try to run a “free hosting” service, where anyone with an email address can sign up, with Virtualmin in its default configuration). That’d be utterly insane.
Obviously, single web developer or in-house development teams can use Virtualmin in its default config and may even find allowing domain owners more privileges (e.g. the ability to directly edit service configuration, etc.) is reasonable. Webmin is kinda unique in this space for allowing fine-grained delegation of root-level tasks, but that only comes up with users in a trusting environment, like a bunch of employees in the same organization sharing hosting systems.