Real Bug Bounty & Penetration Testing on Live Websites: Step-by-Step Guide (Part 2)
An API endpoint was left in its default state and returned a wildcard CORS header, reflecting any supplied Origin. An attacker could read data from that endpoint from any website, though the text does not show what data was exposed.
Published on medium.com
Well, well! After the boom-bastic article on the Identification step in our bug bounty and penetration testing series onreal Goverment websites, we’re back with the next phase of our methodology: Misconfiguration.
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 API endpoint was deployed with default settings and a permissive CORS policy that echoes any Origin.
Impact
A malicious site could read responses from the endpoint in a victim's browser, but the text does not show which data or whether credentials were required.
What the attacker needed
Victim visits an attacker page; endpoint reachable from the browser
The fix
The endpoint should be configured to allow only trusted origins instead of reflecting any Origin.
How it was found
- Run a content discovery scan on the API endpoint to find more paths.
- Visit the discovered pages and notice a redirect to an internal service on a local port.
- Send a request with a custom Origin header and observe it reflected in the CORS response header.
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.
CORS is a browser rule that decides which websites may read responses from another site. Here the server said any website may read its responses, so a malicious page could fetch data on a visitor's behalf. The author also found an API page still showing its default 'Hello World' content.
What is CORS?
A permissive cross-origin policy lets another site read responses with the user's credentials.