Unsanitized user input in HTTP response (XSS)

Description

Sending unsanitized user input in a response puts your application at risk of cross-site scripting attacks.

Remediations

❌ Avoid including user input directly in a response:

res.send(req.body.data)

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

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

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