3 ms·
What does this mean to someone with a public facing website that uses PHP w/ Apache or Nginx?
by timboslice 11y ago
What does this mean to someone with a public facing website that uses PHP w/ Apache or Nginx?
- mahouse 11y agoMy guess is that nothing unless you let the user input REs. (Or use REs that can be modified by user input)
- timboslice 11y agoThank you :)
- alanstorm 11y agoIt means if you have a PHP script or application (Wordpress, Drupal, etc) on your server, and there's code in the script or application that uses one of the `pcre_` functions, and that the regular expression passed to that `pcre` function uses user input to create a regular expression, then an attacker can theoretically run any unix command on the server. This means your user information (including any passwords in text files) is vulnerable, and it puts the attacker in a great position to gain full access to the server. Until PCRE or PHP release a patch for this, you remain vulnerable. You'd want to defend against this at the web server level -- think `MOD_SECURITY` rules that scan requests, look for known "bad" regular expressions, and then stop that request from reaching the PHP application. If you have a good hosting company hopefully they're already doing this for you.