Skip to content
IDOR Write-up Intermediate

When Encryption Replaced Authorization — and the IDOR Didn’t Go Away

An API endpoint for fetching policy details was vulnerable to IDOR because it did not verify that the requested policy belonged to the authenticated user. After the fix, the identifier was encrypted client-side, but the server still failed to enforce authorization, so an attacker could generate valid ciphertext for another user's policy and access it.

Xp10it Follow

Published on medium.com

You re-run the same test cases, confirm the fix, mark the issue as resolved, and move on. That’s how most stories end.

Xp10it, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The server did not verify that the requested policy belonged to the authenticated user, and it trusted client-supplied encrypted identifiers without performing authorization after decryption.

Impact

An attacker could access other users' policy details, including customer names, contact details, and policy metadata, even after the identifier was encrypted.

What the attacker needed

Authenticated user account; knowledge of policy identifier format

The fix

The server should enforce authorization after decrypting the identifier, binding object IDs to the authenticated user's identity and treating all client input as untrusted.

How it was found

  1. Send an authenticated request to the policy details endpoint with a numeric policy identifier.
  2. Change the last few digits of the identifier and resend the request.
  3. Observe that the response contains policy details for a different user.
  4. Use an automated tool to iterate over a small range of identifiers and confirm multiple valid responses.
  5. After the fix, inspect the client-side JavaScript to understand how the policy identifier is encrypted.
  6. Recreate the encryption logic externally to generate ciphertext for a different policy identifier.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

This is a story about an access control mistake called IDOR (Insecure Direct Object Reference). The application let you request data by changing an identifier, like a number, and it would return someone else's information without checking if you were allowed to see it. Even after they hid the identifier by encrypting it in the browser, the server still didn't check permissions, so you could still access other people's data by creating your own encrypted identifier.

What is IDOR?

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.

More by Xp10it

View all

5 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Insecure direct object reference (IDOR)

The lesson behind this report.

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.