Question 305 of 1,013
SY0-701 Threats, Vulnerabilities, and Mitigations Practice Question
A support agent notices that changing `invoiceId=8842` to `invoiceId=8843` in a portal URL returns another customer's invoice PDF without any additional login prompt. The user is already authenticated to the application. Which vulnerability is most likely present?
⚠ Common exam trap
Test-takers frequently confuse IDOR with SQL injection because both involve manipulating input parameters, but IDOR is about missing authorization checks, not database query injection.
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
✓
Broken access control
The vulnerability is broken access control (B) because the application fails to verify that the authenticated user is authorized to access the resource identified by `invoiceId=8843`. By simply changing a numeric parameter in the URL, the user can view another customer's invoice PDF without any additional authentication or authorization check. This is a classic insecure direct object reference (IDOR) flaw, which falls under the broader category of broken access control.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Cross-site scripting
Why it's wrong here
Cross-site scripting (XSS) is an injection attack that executes malicious scripts in a user's browser by exploiting improper input sanitization, typically within the same page or session. While XSS can steal session tokens or perform actions on behalf of the user, it does not explain how simply altering an invoice ID in a URL grants direct access to another user's invoice. The core issue here is the application's failure to enforce object-level authorization, not script execution. XSS would require the attacker to inject code, whereas this scenario involves an authenticated user changing a parameter to view unauthorized data.
- ✓
Broken access control
Why this is correct
Broken access control occurs when the application fails to properly verify whether an authenticated user is allowed to access a specific object or resource. Changing the invoice ID reveals that authorization is missing or weak.
- ✗
SQL injection
Why it's wrong here
SQL injection occurs when an application fails to properly sanitize user input within SQL queries, allowing an attacker to manipulate database commands, extract data, or bypass authentication. However, changing an invoice ID in a URL to view another user's invoice does not constitute SQL injection, as the user is not crafting SQL syntax or observing database errors. The vulnerability is that the server accepts the ID without verifying ownership, which is a flaw in access control logic, not in query construction. SQL injection would typically yield unauthorized data through crafted input, but here the request is a legitimate, albeit unauthorized, direct object reference.
- ✗
Cross-site request forgery
Why it's wrong here
Cross-site request forgery (CSRF) tricks a victim's browser into sending an unintended, authenticated request to a server, exploiting the user's session without their knowledge. In this scenario, the agent is directly and intentionally modifying the invoice ID in their own session, not being forced to make an unwanted request. CSRF involves a third-party website forging requests, whereas the described behavior is a direct user action that the application improperly allows. The root cause is missing authorization checks on the object ID, not a lack of CSRF tokens or the manipulation of a victim's browser.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Last reviewed: Jun 11, 2026
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.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.