Unsanitized user input in Access-Control-Allow-Origin
- Rule ID: java_lang_insecure_allow_origin
- Languages: java
- Source: insecure_allow_origin.yml
Do not use unverified user-defined input to define Access-Control-Allow-Origin. This can lead to unintended user access to sensitive data.
❌ Avoid defining origins with user input wherever possible.
✅ If unavoidable, be sure to verify the input or to use a safe-list.
OWASP Top 10
To skip this rule during a scan, use the following flag
bearer scan /path/to/your-project/ --skip-rule=java_lang_insecure_allow_origin
To run only this rule during a scan, use the following flag
bearer scan /path/to/your-project/ --only-rule=java_lang_insecure_allow_origin
Ready to take the next step? Learn more about Bearer Cloud.