How I Discovered an API Security Issue: My First Bug Bounty Blog
Several sensitive API endpoints, including account creation and password reset, were exposed without any authentication on a staging API. An attacker could create accounts and reset passwords without being logged in.
medium.com
Published on medium.com
Hi everyone! My name is Satyam Pawale, also known as @hackersatty in the bug bounty world.
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 sensitive API endpoints lacked any authentication or authorisation check, and the API documentation page exposing them was publicly reachable.
Impact
Attackers could mass-create fake accounts and reach password reset and application creation endpoints, and if staging is connected to production this could expose sensitive data or weaken security.
What the attacker needed
Access to the staging API; publicly reachable Swagger UI
The fix
Sensitive endpoints should require authentication such as session tokens or API keys, and the Swagger UI should be restricted to logged-in or internal users.
How it was found
- Open the publicly reachable Swagger UI documentation for the staging API.
- Send a POST request to the user creation endpoint with account details.
- Observe that the account is created even though no login was performed.
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.
An API is the part of a website that other software talks to, and it usually checks who is asking before doing anything sensitive. Here, the check was missing, so anyone who found the address could ask the server to create an account or reset a password. The author found these addresses listed in a documentation page that was itself publicly reachable.
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.