PHP display_errors Is Enabled

Severity: Low

Invicti detected that the display_errors PHP directive is set to enable verbose error messages.


When you enable PHP error messages, an attacker might be able to gain important information about the inner workings of your application. In some cases, an attacker might even enable the abuse of otherwise unexploitable vulnerabilities, such as error based XML External Entity attacks.

Additionally, PHP error messages can speed up certain exploitation attempts, e.g. the extraction of data via an SQL injection or the process of finding the right directory for local file inclusion exploits.

Actions To Take#

There are several ways to disable display_errors. It can be done using ini_set(), an .htaccess file, or a user.ini file. However, it is advised to disable this setting globally on a production system, preferably using the main php.ini configuration file, by adding the following line, or modifying an existing display_errors directive to have the value "Off".

display_errors = Off

Build your resistance to threats. And save hundreds of hours each month.

Get a demo See how it works