Unsanitized user input in Access-Control-Allow-Origin

Description

Do not use unverified user-defined input to define Access-Control-Allow-Origin. This can lead to unintended user access to sensitive data.

Remediations

❌ Avoid defining origins with user input wherever possible.

✅ If unavoidable, be sure to verify the input or to use a safe-list.

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_lang_insecure_allow_origin

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

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