Symfony Profiler Enabled
Description:
Symfony is a popular PHP web framework that bundles and provides several ready-to-use components out of the box. By default, newer versions have Profiler debug mode disabled however, some older versions do tend to enable it even in production environments. Symfony Profiler enables a set of tools to help developers debug their Symfony PHP app but this can also disclose several app environments via stack traces (including secrets) as mentioned by Symfony's official docs:
"Never enable the profiler in production environments as it will lead to major security vulnerabilities in your project." - https://symfony.com/doc/current/profiler.html
Testing:
Profiler can be loaded conditionally or on any page by default. However, you can navigate to one of the following app routes to list all profiles:
Observe each response. You should be able to access Symfony Profiler and should have a tool bar present at the top of the page.
Remediation:
Make sure to set pass the --dev flag when installing using composer:
And in your configuration file, make sure to disable it for certain environments like (test and prod):
And in case you use Symfony Profiler in a controller and wish to disable it programmatically:
It is also highly recommended to disable debug mode in production environments, to do so if you haven't already, simply set the APP_DEBUG
environment variable to false
:
Potential Impact:
Symfony Profiler can expose several app environments and other secrets that can allow a bad actor to perform further attacks using the credentials.
References:
Last updated