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
Which HTTP header prevents a browser from MIME-sniffing a response away from the declared content type?
Answer: X-Content-Type-Options: nosniff
X-Content-Type-Options: nosniff tells browsers to strictly follow the declared Content-Type and not guess the type from content.
What is a Server-Side Request Forgery (SSRF) attack?
Answer: An attacker tricks the server into making HTTP requests to internal or external resources on their behalf
SSRF exploits a server to make requests to internal services or external URLs that the attacker cannot directly access.
In OAuth 2.0, what is the purpose of the 'state' parameter?
Answer: To prevent CSRF attacks during the authorization flow
The 'state' parameter is a random value the client sends and verifies on return to prevent cross-site request forgery during OAuth flows.
Which of the following is the PRIMARY risk of using MD5 to hash passwords?
Answer: MD5 is too fast, making brute-force and rainbow table attacks practical
MD5's speed allows attackers to compute billions of hashes per second, making password cracking via brute-force or precomputed tables feasible.
What does the 'httpOnly' flag on a cookie do?
Answer: Prevents client-side JavaScript from accessing the cookie
The httpOnly flag blocks JavaScript's document.cookie API from reading the cookie, mitigating XSS-based session theft.
A web application returns detailed database error messages to the user. Which vulnerability class does this represent?
Answer: Information Disclosure
Exposing internal error details (stack traces, SQL errors) is classified as Information Disclosure and aids attackers in crafting targeted exploits.
Which Content Security Policy directive controls where scripts can be loaded from?
Answer: script-src
The script-src CSP directive specifies valid sources for JavaScript, blocking inline scripts and external scripts not on the allowlist.
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