We should make the Beta public (famous last words)
The beta version of a shop's site exposed internal service hostnames and API keys in API responses, allowing the attacker to route requests to internal services. This led to an IDOR on gift cards, disclosure of all orders, and a zero-click account takeover via an impersonation endpoint.
Ever since I read this article from Sam Curry and Rhynorater regarding secondary context bugs I’ve always wanted to find and exploit one because once you get around the barrier that developers have put up in front of internal resources, all hell can break loose.
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 beta environment exposed internal service hostnames and API keys in API responses, and the internal services lacked proper authorization checks, allowing host header manipulation to reach them.
Impact
An attacker could steal unclaimed gift cards, access all orders including customer PII, and take over any account, potentially escalating to AWS infrastructure.
What the attacker needed
Access to beta signup; valid email for registration; knowledge of internal hostnames
How it was found
- Register on the beta signup page with an email.
- Observe API responses containing internal hostnames and API keys.
- Change the Host header to an internal service and include the API key to receive a response.
- Fuzz subdomains to discover internal services like [redacted].shop.com.
- For gift cards, use the legacyCardId parameter to access other users' gift cards.
- For orders, use the /v1/legacy/orders/{orderId} endpoint to access other users' orders.
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.
A beta version of a shopping website accidentally revealed the names of internal servers and secret keys in its responses. The attacker used these to talk directly to internal services, bypassing normal checks, and could then read other people's gift cards and orders, and even log in as any user.
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.