Courseiva
Threats, Vulnerabilities, and MitigationsmediumMultiple ChoiceObjective-mapped

SY0-701 Threats, Vulnerabilities, and Mitigations Practice Question

A cloud-hosted application allows users to submit a URL for image processing. Logs show repeated requests such as `http://169.254.169.254/latest/meta-data/` and `http://localhost/admin`. The server is making outbound requests on behalf of the user input. What is the best defensive control to implement?

⚠ Common exam trap

Many exam-takers confuse SSRF with injection attacks and choose a sanitization option like escaping quotation marks, but the real vulnerability is the server's ability to make outbound requests to arbitrary destinations, which requires network-level controls.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Use a strict allowlist for outbound destinations and block link-local metadata addresses

The requests target the AWS EC2 instance metadata service (169.254.169.254) and localhost, which are classic Server-Side Request Forgery (SSRF) attacks. By using a strict allowlist for outbound destinations and explicitly blocking link-local metadata addresses, the application prevents the server from making unauthorized requests to internal or cloud metadata endpoints, thereby mitigating SSRF.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Allow any URL that returns a valid HTTP status code

    Why it's wrong here

    Allowing any URL that returns a valid HTTP status code fails to mitigate SSRF because the attacker only needs to reach an internal service—such as the cloud metadata endpoint at 169.254.169.254—which typically responds with HTTP 200. The check validates the response, not the destination, so internal resources that respond successfully are still exposed. Moreover, an attacker can choose URLs that return 200 for benign-looking paths, making this filter trivially bypassable.

  • Use a strict allowlist for outbound destinations and block link-local metadata addresses

    Why this is correct

    This is the best defense because the application is making server-side requests based on user input. A strict allowlist limits which external destinations the service may reach, and blocking link-local or internal addresses prevents access to sensitive metadata services and localhost resources. This directly reduces the risk of server-side request forgery in cloud environments.

  • Escape all quotation marks before sending the request

    Why it's wrong here

    Escaping quotation marks is a defense against injection flaws like SQL or command injection, where user input can break out of a syntax context. In an SSRF attack, the user-controlled URL is passed to a server-side HTTP client that resolves and fetches it; quote escaping does not alter URL resolution, DNS lookups, or network routing. The application will still request the internal address regardless of how the string is escaped, so this option does nothing to prevent the underlying vulnerability.

  • Require users to change their passwords after each upload

    Why it's wrong here

    Requiring users to change passwords after each upload is an identity and access management control that protects against credential compromise or session hijacking, not against SSRF. SSRF exploits the application's privileged position in the network to access internal resources, and password rotation does not change which destinations the application may reach. This measure is entirely orthogonal to the server-side request handling behavior and leaves the SSRF vulnerability fully exploitable.

About these practice questions

This SY0-701 question is part of Courseiva's 1,013-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This SY0-701 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SY0-701 exam.