Critical PHP-FPM Vulnerability
A 'new' (from may this year) privilege escalation exploit in PHP-FPM has been found by a security firm. More information about CVE-2021-21703:
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-21703
- https://www.ambionics.io/blog/php-fpm-local-root
- https://bugs.php.net/bug.php?id=81026
In PHP versions 7.3.x up to and including 7.3.31, 7.4.x below 7.4.25 and 8.0.x below 8.0.12, when running PHP FPM SAPI with main FPM daemon process running as root and child worker processes running as lower-privileged users, it is possible for the child processes to access memory shared with the main process and write to it, modifying it in a way that would cause the root process to conduct invalid memory reads and writes, which can be used to escalate privileges from local unprivileged user to the root user.
DirectAdmin has already patches out it seems, just update with the standard way via custombuild.
For debian, please track the progress here: https://security-tracker.debian.org/tracker/CVE-2021-21703
The PHP team also announced that since PHP7.3 is close to being end of life, they will probably not be updating it and they will rely on third-party repomasters (like Ondrey) for keeping <php7.3 up to date.
Update asap people!
Comments
The bug report at php.net is from May, 10
It is not a "new" bug at all, I believe. Still critical to patch though.
@gapper at that time it was indeed first discovered but patches are only rolling out since today..
.
Yeah, just updated my boxes a couple of hours ago. Thanks for sharing the info here as well.
Thank you, I will update it soon
@DA_Mark Is DA also going to provide updates for the <PHP7.3 versions with FPM handler? Maybe via a external repo or something like that?
What about cpanel and/or Cloudlinux? Are they already patched?
Hey @NetDynamics24 ! I can't find any information on cPanel + php-fpm actually, not sure about that. Cloudlinux/LSPHP isn't affected by this issue it seems, it's only php-fpm related.
I also already found my answer regarding DirectAdmin thanks to a colleague of mine; DirectAdmin + php-fpm already had patches out it seems if we look into the custombuild scripts:
Nice job, DA team
. Now only some CentOS and Debian/Ubuntu versions left to patch.
Yes, versions 5.6 and up are patched
You're a legend Martynas, thanks
Ok so, Ubuntu also released their mailing. Looks like they updated even PHP5-fpm under the Extended Security Maintenance license which is nice
. They also fixed it for 7.2 in 18.04 LTS.
So they are not patching php7.3??
Thats disappointing..
I'm guessing it's because PHP 7.3 was never part of any LTS release and isn't in any currently supported Ubuntu release (I assume they might've been part of Ubuntu 19.xx, but those are all EOL).
Though it seems that Ondřej Surý's repo has gotten the patch for 7.3 (as well as other PHP versions)
Seems like Debian has patched 7.3:
https://www.debian.org/security/2021/dsa-4993