IDOR in E-Commerce Order Management
E-Commerce Platform — 50,000+ users
Overview
During a black-box web application assessment, our team identified a systematic Insecure Direct Object Reference (IDOR) vulnerability in the order management API. All authenticated users could access, modify, or cancel any order by incrementing a sequential integer ID in the API path — with zero server-side authorisation checks.
Technical Findings
- GET /api/v1/orders/{id} returned full order data including email, addresses, and partial card numbers for any user
- PUT /api/v1/orders/{id}/cancel allowed cancellation of arbitrary orders without ownership validation
- Order IDs were sequential integers starting from 1, enabling trivial enumeration of the entire order history
- No rate limiting or anomaly detection was in place to flag bulk ID enumeration
Business Impact
An attacker could silently exfiltrate the PII (name, email, shipping address, partial payment data) for every customer in the database. Mass order cancellation would directly impact revenue and customer trust. GDPR and PCI-DSS breach notification obligations would be triggered.
Remediation Steps
- 1 Implement server-side ownership checks: verify req.user.id === order.userId before returning or mutating any record
- 2 Replace sequential integer IDs with UUIDs to eliminate trivial enumeration
- 3 Add rate limiting and alerting for abnormal patterns on resource-heavy endpoints
- 4 Write automated integration tests that assert a user in session A cannot access resources owned by session B