Vulnerabilities/

Nginx Code Execution due to Misconfiguration

Impact: High

Description

A misconfigured Nginx with PHP FPM (FastCGI Process Manager) allows an attacker to forward any file to PHP FPM by adding /.php at the end of the file.

Recommendation

Change your PHP FPM configurations in Nginx to be something like below:

location ~ [^/]\.php$ {
  ...
}

Notice the [^/] before \.php in the location directive

References

Last updated on February 07, 2022

This issue is available in SmartScanner Professional

See Pricing