IDOR: sequential order IDs let any customer read and change other customers' orders
- Finding
- RHE-2026-041
- Asset
- https://api.acme.example/v1/orders
- Severity
- High
- CVSS
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N (8.1)
- CWE
- CWE-639
- OWASP
- API1:2023 Broken Object Level Authorization
- VRT
- Access Control (BAC)
- Checks
- 3/3: found, challenged, replayed
- ISO 27001
- A.8.3 · A.8.26 (2022)
- SOC 2
- CC6.1
- NIS2
- Art. 21(2)(e) and (f)
Impact
Order IDs are sequential and the API never checks ownership. Any logged-in customer can read the full order history of any other customer, items, addresses and payment references, and change the delivery address of their open orders, by changing the ID. No privilege escalation: one low-value test account exposes every other account.
Description
GET and PATCH on /v1/orders/{id} accept any order id. The ownership check exists only in the frontend; the API accepts the session of any authenticated user for any order id.
Reproduction
- 1Log in as the provided test account (testuser1) and keep the session cookie.
- 2GET /v1/orders/1001: own order, HTTP 200 (baseline).
- 3GET /v1/orders/1002: another customer's order, HTTP 200, full payload (evidence/response-order-1002.json).
- 4Run evidence/poc.sh: enumerates ids 1001 to 1010, all return 200 (evidence/enumeration-log.txt).
- 5PATCH /v1/orders/2001, an open order of the second test account (testuser2), with a new delivery address from testuser1's session: HTTP 200, address changed, then reverted (evidence/patch-order-2001.http).
Evidence
- evidence/poc.sh: working PoC (bash, read-only)
- evidence/request-order-1002.http: raw request
- evidence/response-order-1002.json: full order payload of a foreign account
- evidence/patch-order-2001.http: delivery address of the second test account changed, then reverted
- evidence/enumeration-log.txt: 41 foreign orders read
Remediation
Enforce object-level authorization: resolve the owner server-side from the authenticated session and reject requests where the resource owner does not match, for reads and writes; add regression test coverage.