Stored XSS
WHAT IS STORED XSS? Stored cross-site scripting (XSS) is a type of attack where an attacker injects a malicious script into a web application and the application saves it. When a victim visits the page, the browser executes the malicious script. Stored XSS is also known as persistent or second-order XSS. HOW DOES STORED XSS WORK? 1.An attacker finds a vulnerability in a web application. 2.The attacker injects malicious code into the application, often through a user input field like a comment section. 3.The application saves the malicious code in a database or other location. 4.When a victim visits the infected page, the malicious code is sent to their browser. 5.The victim's browser executes the malicious code, which can steal the victim's session information or other data. MITIGATION FOR STORED XSS? 1. Validate user input : Check that user input matches what the system expects. For example, you can limit the characters allowed for a phone number. 2....