Security Flashcards
7 cards from real Web Development practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.
Read the first 7 Security flashcards as text
What is a race condition vulnerability in web applications?
Answer: Two concurrent requests exploit a window between a check and its enforcement, leading to unintended state changes
Race conditions (TOCTOU — Time-of-Check to Time-of-Use) occur when concurrent operations bypass security checks that assume sequential execution.
Which of the following correctly describes a reflected XSS attack?
Answer: User input is immediately echoed back in the response without sanitization, executing in the victim's browser when they click a crafted link
Reflected XSS uses a crafted URL containing a script payload that the server reflects back in the response, requiring the victim to click the link.
What is the purpose of a Web Application Firewall (WAF)?
Answer: To filter, monitor, and block malicious HTTP traffic targeting application-layer vulnerabilities
A WAF inspects HTTP requests and responses, applying rule sets to block common attacks like SQLi and XSS before they reach the application.
Which security concept does 'defense in depth' describe?
Answer: Layering multiple independent security controls so that failure of one does not compromise the whole system
Defense in depth stacks multiple security layers (WAF, input validation, parameterized queries, least privilege) so attackers must defeat every layer.
What is subdomain takeover and how can it occur?
Answer: A dangling DNS CNAME points to an unclaimed resource (e.g., deleted cloud bucket), allowing an attacker to claim that resource and serve content on the subdomain
Subdomain takeover occurs when a DNS entry points to a deprovisioned service; an attacker who claims that service can serve arbitrary content under the legitimate domain.
In secure coding, what does 'parameterized queries' (prepared statements) prevent?
Answer: SQL Injection by separating SQL code from user-supplied data so input is always treated as data, never as executable SQL
Parameterized queries send SQL structure and user data separately to the database driver, making it impossible for input to alter the query's logic.
What is the Same-Origin Policy (SOP) in web browsers?
Answer: A security mechanism that restricts scripts on one origin from reading resources from a different origin unless explicitly allowed
SOP prevents malicious scripts on one origin (scheme + host + port) from accessing sensitive data from another origin, protecting user data across sites.
How this page was made: written with AI tools. We have not yet matched this exam's facts to an official source, so confirm fees, dates and rules with the exam body. Not reviewed by a subject-matter expert. Editorial policy