What this quiz covers
This quiz focuses on Idor And Mitigations, giving you a quick way to practice the rules, question types, and explanations that matter most for Cyber Security.
A multi-tenant API exposes GET /organizations/{orgId}/projects/{projectId}. It confirms that the authenticated user belongs to orgId, then retrieves the project using only projectId. Project identifiers are globally unique. An attacker supplies the identifier of an organization they belong to together with a project identifier from another organization.
Which authorization change best prevents this attack?
projectId belongs to orgId and that the current user is authorized for that project before returning it.orgId and then encode projectId so that identifiers from other organizations have a different format.projectId is globally unique and reject requests containing an identifier already used by another organization.Cyber Security Quiz
Practice Idor And Mitigations in Cyber Security with focused quiz questions that help you check what you know, review explanations, and build confidence with test-style prompts.
This quiz focuses on Idor And Mitigations, giving you a quick way to practice the rules, question types, and explanations that matter most for Cyber Security.
Try each quiz question before looking at the correct answer. Use the explanations to review missed ideas, then come back to similar questions until the pattern feels familiar.
A multi-tenant API exposes GET /organizations/{orgId}/projects/{projectId}. It confirms that the authenticated user belongs to orgId, then retrieves the project using only projectId. Project identifiers are globally unique. An attacker supplies the identifier of an organization they belong to together with a project identifier from another organization.
Which authorization change best prevents this attack?
projectId belongs to orgId and that the current user is authorized for that project before returning it. (correct answer)orgId and then encode projectId so that identifiers from other organizations have a different format.projectId is globally unique and reject requests containing an identifier already used by another organization.orgId, but then fetches a project using projectId alone — without confirming that project actually belongs to that organization. An attacker can freely swap in any projectId they discover, crossing tenant boundaries while appearing legitimate in the org check.
A is correct because it closes the gap entirely. By verifying that projectId belongs to orgId and that the user is authorized for that specific project, the API enforces a complete authorization chain. The relationship between the two URL parameters is validated, not assumed.
B is wrong because encoding or reformatting identifiers is security through obscurity. A determined attacker can still observe valid identifiers from their own organization, probe patterns, or intercept traffic. Format differences don't enforce access boundaries.
C is wrong because global uniqueness is already stated in the scenario — it doesn't prevent cross-tenant access. Rejecting duplicate identifiers addresses a non-existent problem and doesn't fix the actual authorization flaw.
D is wrong because deferring authorization checks to login time and trusting URL structure is exactly the vulnerable pattern being described. Tenant context must be re-validated on every request, not assumed from session state.
When you see hierarchical API endpoints like /parent/{id}/child/{id}, always ask: does the API verify that the child actually belongs to that parent? That's your BOLA red flag.A case-management application allows case owners, assigned investigators, and designated auditors to view a case. A proposed fix for an IDOR issue adds the condition case.owner_id == current_user.id to every case endpoint.
What is the most appropriate evaluation of this proposed mitigation?
case.owner_id == current_user.id) only allows the case owner through. But the passage explicitly states that investigators and auditors also have legitimate access. By hardcoding a single ownership check, the fix breaks valid workflows — an auditor trying to review a case would be denied access, even though that's exactly what auditors are supposed to do. The correct approach, reflected in C, is to evaluate a server-side access policy that accounts for the user's role, their relationship to the case, and the specific action being requested (view, edit, close, etc.).
A is wrong because secure IDOR mitigation does not require restricting access to a single owner. Multi-role access is legitimate and common — the mitigation must reflect the full access policy, not oversimplify it. B is a dangerous misconception: moving authorization logic to the UI leaves the server-side endpoints completely unprotected, since UI controls can be bypassed trivially. Authorization must live server-side. D confuses the problem entirely — hashing the owner ID doesn't address whether the current user is authorized; it just obscures an identifier without solving the access-control flaw.
As a study tip, remember that IDOR mitigations must enforce access control server-side based on role and relationship, not just identity matching — watch for answers that oversimplify to a single-user ownership check.A multi-tenant service receives GET /records/{id} with an X-Tenant-ID header. Its database query filters by both the record identifier and the header value. Any authenticated user can modify the header. The application does not compare the header with tenant membership stored in the user's server-validated session.
Which revision most effectively closes the authorization gap?
X-Tenant-ID) to scope database queries instead of deriving tenant context from something the server already verified. Answer D closes this gap directly: by pulling tenant membership from the validated session or authoritative server-side data, the server — not the client — determines which tenant a user belongs to, and the record lookup is scoped accordingly. An attacker who modifies the header gains nothing, because the header is simply ignored for authorization.
Answer A misunderstands the problem entirely. Enforcing global uniqueness of identifiers is a data-integrity concern, not an authorization fix — a user could still query records belonging to a different tenant. Answer B is an input-validation measure that sanitizes the header's format, but a well-formed X-Tenant-ID value belonging to a different tenant is just as dangerous as a malformed one; filtering characters does nothing to prevent tenant hopping. Answer C introduces encryption, which provides confidentiality in transit but zero authorization enforcement — once decrypted server-side, the untrusted client-supplied value is still used as the trust boundary, leaving the flaw intact.
A reliable study tip: whenever a question involves a value the client can freely set or modify, any answer that validates, sanitizes, or encrypts that value without replacing it with server-authoritative data is a distractor. True authorization fixes always move trust to the server side.An application lets customers generate account exports. POST /exports verifies that the authenticated customer owns the requested account and returns a random export job identifier. Later, GET /exports/{jobId} verifies only that the requester is authenticated before returning the completed file. The job identifiers are long and unpredictable.
Which change most directly addresses the remaining IDOR risk?
GET /exports/{jobId} to verify that the job is authorized for the authenticated customer before returning it. (correct answer)POST /exports so that unauthorized users cannot initiate export jobs.POST /exports correctly checks ownership, but GET /exports/{jobId} only checks that the requester is logged in — any authenticated customer could retrieve another customer's export file if they somehow obtained the job ID. That's the IDOR gap. Answer A closes it directly by adding an authorization check at the retrieval endpoint, ensuring the authenticated user actually owns that specific job before the file is returned. This is the principle of enforcing object-level authorization at every sensitive operation, not just creation.
B is a common misconception — making identifiers long and random (security through obscurity) reduces guessability but doesn't eliminate the vulnerability. If a job ID is ever leaked via logs, referrer headers, or shared links, the flaw remains fully exploitable. Obscurity is not authorization.
C addresses CSRF, which is a completely different attack class involving forged requests from another origin. CSRF protection on POST /exports has no bearing on whether an authenticated attacker can retrieve someone else's export via GET.
D is a client-side mitigation that does nothing to enforce server-side access control — it only slightly reduces accidental disclosure.
Your study takeaway: authentication ≠ authorization. IDOR vulnerabilities exist when a server confirms who you are but not whether you're allowed to access this specific object. Always look for per-object ownership checks.An origin server correctly verifies ownership before returning /statements/{statementId}. A newly added CDN caches successful responses using only the URL path as the cache key. It does not vary the cache by authenticated user or session. After one customer requests a statement, another authenticated customer requests the same path and receives the cached response without the origin being contacted.
Which remediation most directly preserves object-level authorization in this architecture?
Cache-Control: private (preventing CDN storage entirely) or by partitioning cache entries per authenticated user context — ensuring the authorization boundary is maintained regardless of caching behavior. This is the most direct remediation because it addresses the exact mechanism causing the leak.
B is a common distractor that confuses obscurity with security. UUIDs make enumeration harder, but if an attacker already knows or can observe a valid statement URL, the CDN still serves them the cached response without authorization checks. Guessability and authorization are separate problems.
C sounds clever but is logically flawed. Moving the ownership check to creation time doesn't help when the vulnerability occurs at retrieval time. Authorization must be enforced when the resource is accessed, not just when it's created.
D conflates CSRF protection with authorization. Anti-CSRF tokens prevent cross-site request forgery; they have no bearing on whether an authenticated-but-unauthorized user retrieves a cached document through a normal request.
Your takeaway: when caching is introduced into an architecture, always ask "is the cache key scoped to the authorized user?" If not, caching can silently break object-level access control.A storage platform queues deletion requests. The web tier verifies that the requester currently has permission to delete /folders/{folderId}, then places only folderId in a queue. Before the worker processes the job, the folder is transferred to another department and the requester's access is revoked. The worker deletes the folder without performing another authorization check.
Which approach best addresses the object-authorization risk while preserving queued processing?
A document service replaces sequential document numbers with UUIDs. During a support session, a user receives another customer's document UUID in an error message. Substituting that UUID into GET /documents/{uuid} returns the other customer's document because the endpoint checks only whether the requester is logged in.
Which assessment of the design is most accurate?
A medical portal provides links such as /reports/{reportId}?sig={signature}. The signature proves that the report identifier was generated by the portal and expires after one hour, but it is not bound to a user. The requirement states that reports must remain accessible only to the authenticated patient who owns them. Links can appear in browser synchronization records and proxy logs.
Which design best satisfies the stated requirement?
reportId within the link so that recipients cannot determine which database record it references.A banking application uses POST /payees/{payeeId}/delete. The request requires a valid session cookie and an anti-CSRF token. The server deletes the referenced payee without checking which customer owns it. A customer can submit another customer's payee identifier using their own valid token.
Why does the anti-CSRF control not prevent this IDOR attack?
#4892. The attacker simply uses their own valid session and token while swapping in a victim's payee ID. Both checks pass; the missing check is ownership.
B is wrong because it invents a false rule — anti-CSRF tokens absolutely apply to state-changing operations; that's their primary purpose. The flaw isn't about which operations the token covers.
C is wrong because CSRF defense effectiveness has nothing to do with whether resource identifiers are sequential or random. You're conflating CSRF with IDOR enumeration risk, which is a separate concern.
D is nonsensical — the token doesn't authenticate the payee at all, and replacing CSRF tokens with HTTP Basic Authentication would solve neither the CSRF problem nor the IDOR problem.
Study tip: On security exams, remember that authentication, CSRF protection, and object-level authorization are three separate layers. A question showing that one layer is satisfied while another is bypassed is almost always testing whether you understand their distinct, non-overlapping responsibilities.A GraphQL API exposes node(id: ID!), which can return invoices, projects, or public articles. The top-level resolver verifies that the requester is authenticated. Type-specific resolvers then load objects by decoded database identifier. Only the invoice list query applies an ownership filter.
Which change provides the most reliable mitigation for invoice IDOR through node?
node interface is a perfect storm for IDOR because it provides a generic, unified access point. Even if the invoice list query enforces ownership, an attacker can bypass that filter entirely by calling node(id: "$invoice_123$") directly. The fix, which is what B describes, is to enforce invoice ownership checks inside the invoice type resolver itself — so no matter how a client reaches an invoice object (list query, node query, or any future query), authorization fires every time. This is called object-level authorization, and it's the only reliable defense.
A is a UI-level control, not a server-side control. Hiding identifiers in the interface doesn't prevent an attacker from observing them through traffic analysis or from guessing them. Security through obscurity is not authorization.
C describes the exact vulnerability in the passage — confusing authentication (who are you?) with authorization (are you allowed to access this specific invoice?). Confirming a user is logged in doesn't mean they own every object they request.
D is another obscurity measure. Base64 is encoding, not encryption. Identifiers remain guessable or observable, and encoding them provides zero access control.
For exam questions about IDOR, always ask: where exactly is the ownership check enforced? If the answer is anywhere other than the object resolver itself, the protection can be bypassed.