Analysis:
During the analysis, it was observed that the mentioned application was not validating the user-provided input and directly included that input within the immediate HTTP response in an unsafe way. Please refer to the below-provided evidence or proof of concept:
Provide your screenshot here with the steps
Impact:If an attacker can control a script that is executed in the victim's browser, then an attacker can execute arbitrary JavaScript in the victim's browser, redirect a victim to a malicious website, hijack user session, keylogging, completely compromise that user, view any information that user is able to view, etc.
Recommendation:
• Encode all fields when displaying them in the browser
• Ensure that user input is properly sanitized especially in the case of special characters
• Ensure that cookie properties (such as HttpOnly) and security headers (such as Strict-Transport-Security, X-Frame-Options, X-XSS-Protection, X-Content-Type-Options, Access-Control-Allow-Origin), especially CSP (Content Security Policy) are set accordingly
It is strongly recommended to implement the following mitigations:
• Ensure that user input is properly sanitized especially in the case of special characters
• Ensure that cookie properties (such as HttpOnly) and security headers (such as Strict-Transport-Security, X-Frame-Options, X-XSS-Protection, X-Content-Type-Options, Access-Control-Allow-Origin), especially CSP (Content Security Policy) are set accordingly
• Properly validate and HTML encodes the special characters in user-supplied data.
References
https://portswigger.net/web-security/cross-site-scripting/reflected
Comments
Post a Comment