💥How We Hacked inside e-commerce company: From Hidden Endpoints to Server Files: Our Full Exploitation Chain on a Bug Bounty Target💥
The application had a hidden registration endpoint and exposed many API endpoints in JavaScript files, allowing unauthorised access to features. Attackers could also exploit stored XSS, IDOR to view other users' orders, and local file inclusion to read server files including secrets.
Published on d0loreh4z3.medium.com
Me And Omar ElSayed During reconnaissance and Hunting on one of the target application, We identified a chain of critical vulnerabilities that exposed core business logic, sensitive user data, and server-level files. The issues ranged from hidden registration endpoints, full feature disclosure via JavaScript, and…
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 missing access controls and input sanitisation across multiple features, plus sensitive endpoints exposed in client-side code.
Impact
Attackers could register without authorisation, access other users' orders and personal data, execute stored XSS, and read sensitive server files including secrets, though the report notes the program later marked reports as out of scope.
What the attacker needed
None for hidden endpoint discovery; victim views order notes for stored XSS; knowledge of order IDs for IDOR
How it was found
- Review hidden JavaScript files and guess common API patterns to find a registration endpoint.
- Send a request to the registration endpoint with required parameters to create an account.
- Log in and access the account page to view account data.
- Use a JavaScript script to reveal hidden fields and disabled elements, making all functions interactable.
- Extract all endpoints from JavaScript files, finding over 60 working endpoints.
- Proceed to checkout and inject an XSS payload in special notes, which executes on the next page.
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.
This report describes several security holes in an online shop. One let people create accounts even though there was no sign-up page, by finding a hidden web address. Others let attackers see other customers' orders and read private files on the server, like a password file.
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.