Skip to content
IDOR Write-up Advanced

“Day 20: The Chain Reaction — From a Tiny IDOR to a Supply Chain Nightmare”

An IDOR in a customer portal's invoice endpoint let the tester view other companies' billing data and obtain their company identifiers. By chaining this with a proxy endpoint that issued a broadly scoped signed URL token, the tester accessed an internal API, retrieved CI/CD configuration and repository credentials, and could overwrite a build script to execute code in other customers' pipelines.

Aman Sharma Follow

Published on amannsharmaa.medium.com

It started with a hunch. A SaaS company, let’s call them “DevFlow,” sold a popular CI/CD tool.

Aman Sharma, on amannsharmaa.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

Likely missing ownership checks on object identifiers and overly broad trust between services, allowing a customer token to be exchanged for access to an internal API and its CI/CD configuration.

Impact

The tester could execute code within another customer's CI/CD pipeline, potentially stealing environment secrets such as production database credentials and signing keys.

What the attacker needed

A customer account on the portal; knowledge of another company's identifier; victim triggers a build

The fix

The report recommends enforcing ownership checks on every object-ID endpoint, isolating internal APIs from customer-facing tokens, scoping signed-URL tokens to a single operation and resource, and avoiding unverified download-and-execute steps in CI/CD pipelines.

How it was found

  1. Change the invoice_id in the customer portal invoice API request to view another company's invoice.
  2. Note the victim company_id from the unauthorised invoice response.
  3. Use the audit log export endpoint with the victim company_id to obtain a signed URL token.
  4. Call the internal CI configuration endpoint with that token to retrieve the victim's CI/CD configuration and repository API key.
  5. Use the stolen repository API key to overwrite the install script in the artifact repository.
  6. Wait for the victim's next build to fetch and execute the malicious script.

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.

An IDOR (Insecure Direct Object Reference) is when a website lets you change an identifier in a request, such as an invoice number, and see someone else's data because it does not check that the data belongs to you. Here, that small leak gave away company identifiers, which were then used to reach an internal system and, eventually, to tamper with software builds. The lesson is that small access-control mistakes can be chained into much bigger attacks.

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 Aman Sharma

View all

34 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.