Which of the following threat types involves the sending of untrusted data to a user's browser to be executed with their own credentials and access?
Click on the arrows to vote for the correct answer
A. B. C. D.B.
Cross-site scripting (XSS) is an attack where a malicious actor is able to send untrusted data to a user's browser without going through any validation or sanitization processes, or where the code is not properly escaped from processing by the browser.
The code is then executed on the user's browser with the user's own access and permissions, allowing an attacker to redirect their web traffic, steal data from their session, or potentially access information on the user's own computer that their browser has the ability to access.
The correct answer is B. Cross-site scripting (XSS).
Cross-site scripting (XSS) is a type of security vulnerability in web applications where an attacker injects malicious code into a web page viewed by other users. The injected code can execute in the victim's browser with the victim's privileges and access, allowing the attacker to steal sensitive data, perform unauthorized actions, and take over user accounts.
The attacker can inject the malicious code in different ways, including:
To prevent XSS attacks, web developers must properly validate and sanitize all user input, including form data, query parameters, and HTTP headers. They should also use web application firewalls (WAFs) and browser security mechanisms, such as Content Security Policy (CSP) and HTTP-only cookies, to limit the impact of successful attacks.
The other answer options are also types of web application vulnerabilities: