What is the primary vulnerability exploited by Cross-Site Scripting (XSS) attacks on web applications?
Answer and explanation
Correct answer: A. Inadequate validation and sanitization of user-supplied input before reflecting it into web pages
- Step 1: Cross-Site Scripting (XSS) occurs when an application includes untrusted user input in a web page without proper validation or output encoding.
- Step 2: This allows attackers to execute malicious JavaScript in the victim's browser to hijack sessions or steal cookies.
Answer
Inadequate validation and sanitization of user-supplied input before reflecting it into web pages.
Why not the others: 'Lack of backend encryption' relates to data at rest security; 'Firewall packet inspection' addresses network layer attacks; 'CPU exhaustion' relates to denial-of-service.
Practise more Python Programming, Data Structures, Algorithms, Networks and Cybersecurity.
Free questions with an explanation for every one, and full timed Saudi Secondary School Certificate mock tests.
More Python Programming, Data Structures, Algorithms, Networks and Cybersecurity questions
- What is the time complexity of searching for an element in an unsorted array of elements using linear search?
- What is the output of the following Python expression: `[x**2 for x in range(5) if x % 2 == 1]`?
- Which data structure operates on a Last-In, First-Out (LIFO) access principle?
- Which SQL clause is used to filter aggregated group records after a `GROUP BY` statement has been applied?
- What type of network topology connects all nodes to a central forwarding device such as a network switch?
- In cybersecurity, what type of malicious attack overwhelms a web server with massive volumes of traffic from multiple compromised sources to…