Closed ghost closed 1 year ago
My WordPress site always consumes 100% CPU after I update the docker image version (about 5 days ago)
Today I decided to change the docker image to Bitnami Wordpress instead
I'll wait and see if the abnormality goes away.
Apparently the problem was in the opened port for fpm in wordpress:6.3.1-php8.1-fpm service. Somehow attackers install malware through fpm/FastCGI in just a few seconds using this 9000 port. So if you don't need this port publicly opened, set it as '127.0.0.1:9000:9000' in your docker compose file.
Apparently the problem was in the opened port for fpm in wordpress:6.3.1-php8.1-fpm service. Somehow attackers install malware through fpm/FastCGI in just a few seconds using this 9000 port. So if you don't need this port publicly opened, set it as '127.0.0.1:9000:9000' in your docker compose file.
Correct, if you expose the fpm port to the broad internet, it is simple for hackers to exploit: https://blogs.juniper.net/en-us/threat-research/rce-attacks-targeting-misconfigured-open-php-fpm. We recommend that you only expose it within a local-only network (like a docker network
or kubernetes pod).
The Docker Official Images CI does not build any malware/crypto currency miners into the images (or any scripts/binaries to install a miner/malware). No Docker systems have any access to containers or databases you create with Official Images. The exact Dockerfiles used to build the wordpress
images are in this repo.
I just found something weird, some weird logs and probably crypto miner in try to run Wordpress website using this image wordpress:6.3.1-php8.1-fpm. After few hours of running this website with clean install on clean Ubuntu server, I found this issue. Wordpress was just installed without any other changes. So here is the docker compose and log images.
I have tested it a few times in the past few days and the outcome is always the same. Kinsing malware files appeared in the docker overlay2 folder inside folders related to the Wordpress container (UpperDir). It does not appear immediately when you run docker container, it appears a few hours later.