🕵️ The Case of the Hidden Endpoint: How Enumeration Unlocked a Tricky Vulnerability
An internal API endpoint was protected only by a check on the client IP address, which could be spoofed with a header. An attacker could then read every customer's order details, including names, addresses, emails and phone numbers.
Published on medium.com
🕵️ The Case of the Hidden Endpoint: How Enumeration Unlocked a Tricky Vulnerability
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 the server trusted the X-Forwarded-For header to decide the request came from localhost, instead of enforcing proper authentication and authorisation.
Impact
An attacker could read the full names, addresses, phone numbers, emails and order history of all customers.
What the attacker needed
None
How it was found
- Enumerate directories on the API subdomain, including 403 responses, to find /v2/internal/orders.
- Extract JavaScript files and search them for parameter names, finding user_id.
- Try bypasses such as trailing slash, dot injection, URL encoding and IP spoofing headers.
- Send a request with X-Forwarded-For set to a local address to get a 200 response.
- Change the user_id value to retrieve orders for other users.
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.
The website had a hidden page meant only for staff. It decided who could see it by looking at a header that says where the request came from, but anyone can write anything in that header. By pretending to be a local machine, the researcher could see all customer orders.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.