Permissive Access-Control-Allow-Origin detected.

Description

Setting the Access-Control-Allow-Origin header to "*" allows code from any origin to access the response. This can lead to unintended access to sensitive data.

Remediations

✅ Permit only the specific origins needed by your application

header("Access-Control-Allow-Origin: myapp.example.com");

Resources

Associated CWE

OWASP Top 10

Configuration

To skip this rule during a scan, use the following flag

bearer scan /path/to/your-project/ --skip-rule=php_symfony_permissive_allow_origin

To run only this rule during a scan, use the following flag

bearer scan /path/to/your-project/ --only-rule=php_symfony_permissive_allow_origin

Ready to take the next step? Learn more about Bearer Cloud.