Unsanitized User Input in Output Stream (XSS)
Overview
Rule ID:
java_lang_xss_response_writer
Applicable Languages: Java
Weakness ID: CWE-79
Description
Cross-site scripting (XSS) vulnerabilities arise when unsanitized user input is included in web page content. This flaw can lead to the execution of malicious scripts within the user's browser, compromising the security of user data and interactions with the application.
Remediation Guidelines
Use an encoder to handle user input before incorporating it into the output stream. This minimizes the risk of XSS attacks by converting potentially dangerous characters into a safe format.
Additionally, sanitize user input to remove or neutralize unwanted scripts. Sanitization goes beyond encoding by actively eliminating harmful content from user input before it is used in the output.
References
Configuration
To omit this rule during a scan, and to provide you with continuous 24/7 code-level scanning, you can employ our SAST TOOL
Last updated