Earlier quoted context omitted.
Common approach is to serve static files with nginx and use apache / php_mod to process. Why are you running php-fpm? Do you need to separate request's processes? The speed benefits of php-fpm are part of php 7 so using php_mod is faster now.
> Common approach is to serve static files with nginx and use apache / php_mod to process. Not sure how common that really is, I've personally never set things up like that and just use nginx + php-fpm and don't know anyone that still uses apache with mod_php.
PHP-FPM remote code execution bug exploited in the wild
31–40 of 139 posts
Re: PHP-FPM remote code execution bug exploited in the wild
#32Earlier quoted context omitted.
Why are you not running php-fpm with Apache is a more pressing question IMO.
Speed mostly.
Re: PHP-FPM remote code execution bug exploited in the wild
#33And it's the config settings every blog ive ever seen about nginx + php-fpm said to use. So I think a lot of sites are vulnerable right now.
Re: PHP-FPM remote code execution bug exploited in the wild
#34FYI : If you have a NextCloud or Owncloud installation. The recommended nginx configuration is vulnerable [1] [1] https://nextcloud.com/blog/urgent-security-issue-in-nginx-ph...
Re: PHP-FPM remote code execution bug exploited in the wild
#35PHP security has improved markedly over time (especially app security, not just the runtime), but it's still.. well.. stuff like this. This time around I'm lucky that the sole app I run was using Apache
Re: PHP-FPM remote code execution bug exploited in the wild
#36I'm, not responsible for any public-facing webservers any more. My life is much better.
[Edit: I reckon using a well-designed functional language might reduce the risk - like, PHP was never designed at all, it grew by accretion]
Re: PHP-FPM remote code execution bug exploited in the wild
#37Earlier quoted context omitted.
> Common approach is to serve static files with nginx and use apache / php_mod to process. Not sure how common that really is, I've personally never set things up like that and just use nginx + php-fpm and don't know anyone that still uses apache with mod_php.
We went from php_mod to php-fpm but we started moving back to php_mod after php 7 came out showing the benchmarks.
Our newer applications are using litespeed instead, and we've found it to be significantly better. You basically get the features of a nginx + apache + varnish stack in a single easily managed service and with better performance too.
Re: PHP-FPM remote code execution bug exploited in the wild
#38Re: PHP-FPM remote code execution bug exploited in the wild
#39For those of you not speaking Russian, Russian for ‘dick’ & ‘cunt’ (also meaning ‘something very bad happening’) are in the title.
Re: PHP-FPM remote code execution bug exploited in the wild
#40My job used to include writing PHP webpages that were exposed to the internet, and looking after the webservers they were running on. I'm, not responsible for any public-facing webservers any more. My life is much better. [Edit: I reckon using a well-designed functional language might reduce the risk - like, PHP was never designed at all, it grew by accretion]
If you dont practice defense-in-depth, you get rekt eventually.
I just checked my installation, its safe, since I didnt follow their "recommended" settings at all.
Since its a PHP app, what I do is put an extra nginx proxy infront of it, so there is nginx 1 (this one runs in its own lxc container with seccomp and has not even a /bin/sh in it, only executables and libc required for nginx, its only a network reverse proxy) - nginx2 (special instance for each php app, also same as nginx1 container with _nothing_ in it, but also a bind mounted ipc_socket which is also mounted to php_app container.
So the php_app container and nginx2 share only 1 ipc.socket bind mounted from the host. Now then, in the php app container, there is also lack of /bin/sh or anything else, not even the package manager, only what php-fpm requires, and the nextcloud .php scripts, are in there. _nothing_ else.
So even if this exploit would have worked, there would still be nothing standard to run in the php-app container (like /bin/ls), except the php scripts themselves, though thats bad enought to steal my nextcloud data.