My First IDOR in Hindustan Times
The voting API for a photography competition did not properly validate JWT tokens, allowing an attacker to enumerate tokens and cast votes without a valid account. The author exploited this to vote without registering.
medium.com
Published on medium.com
I was looking at a photography competition being organised by hindustan times. I saw that it requires me to make an account to register an vote for an image I like.
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 for voting failed to validate the JWT token, allowing requests with invalid or enumerated tokens to succeed.
Impact
An attacker could cast votes without registering, potentially manipulating the competition results.
What the attacker needed
Access to the competition website; ability to send API requests
How it was found
- Visit the photography competition page and note that voting requires an account.
- Try to vote by sending a request directly to the backend API without a valid token; it is denied.
- Observe that the site uses a JWT token for verification.
- Enumerate the API and discover that token validation is missing.
- Write a script to enumerate tokens and successfully cast votes.
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 JWT token is like a digital pass that proves you are logged in. The website's voting system was supposed to check this pass, but it did not, so someone could make up or guess passes and vote without an account. This is called an IDOR (Insecure Direct Object Reference) because the system directly uses an identifier without checking if you are allowed to use it.
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.