Unsanitized request data in Spring UI model (XSS)

Description

Cross-site scripting (XSS) vulnerabilities occur when unsanitized user input is included in web page content. This flaw can lead to malicious scripts being executed in the context of the user's browser, compromising the security of user data and interactions with the application.

Remediations

  • Do validate the input before adding it to the UI model.
  • Do sanitize user input to remove or neutralize unwanted scripts.

References

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=java_spring_model_reflected_xss

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

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