One Forgotten Subdomain, Thousands of User Records — A Recon Story
A legacy subdomain exposed an internal user export endpoint that required no authentication and was cached publicly. An attacker could poison the cache with a privileged role header to make the cached response contain thousands of user records, which anyone could then retrieve.
infosecwriteups.com
Published on infosecwriteups.com
Free Link🎈
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 legacy API trusted the X-User-Role header for authorization and the cache used that same header in its Vary directive, allowing a privileged response to be cached and served to unauthenticated users.
Impact
Thousands of user records, including names, emails, phone numbers, and internal role flags, could be retrieved by anyone without authentication during the cache window.
What the attacker needed
No authentication required; knowledge of the legacy subdomain; cache window active
The fix
The legacy endpoint should require authentication and authorization, and the cache should not vary on user-controlled headers or cache privileged responses.
How it was found
- Enumerate subdomains and filter for legacy or internal names.
- Resolve the legacy subdomain and probe it to confirm it is live.
- Use historical URL data to find the internal user export endpoint.
- Send a request with an admin role header and observe a larger response.
- Repeat the request without special headers and confirm the cached privileged data is returned.
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 company had an old, forgotten web address that still worked. It had a page that listed user details, and it did not ask for a password. The page was also stored in a shared cache, so when the researcher asked for it while pretending to be an admin, the cache saved that admin version and showed it to everyone else.
What is Cache bugs?
A cache and the origin disagree about a request, so a poisoned response is served to everyone or a private page is stored as public.