CSRF to account takeover in https://███████.mil/
A password-change form on a military site was submitted cross-site via a crafted HTML page, which the reporter says could take over an account.
Originally disclosed on HackerOne
- Disclosed after 25 days
Summary: Hello Description:
Impact
Step-by-step Reproduction Instructions
- Go to https://███.mil/ and login using your credintials
- Now Click on change password
- First turn the intercept of burp to on and enter your secondary email id and password and click on register password.
<html>
<!-- CSRF PoC - kira-->
<body>
<script>history.pushState('', '', '/')</script>
<form action="https://████████.mil/scripts/wa.exe" method="POST">
<input type="hidden" name="GETPW2" value="GETPW1" />
<input type="hidden" name="Y" value="a█████" />
<input type="hidden" name="p" value="████████" />
<input type="hidden" name="q" value="███████" />
<input type="hidden" name="X" value="" />
<input type="submit" value="Submit request" />
</form>
</body>
</html>
4: Now send the link to the victims
Product, Version, and Configuration (If applicable)
██████
Impact
It is a critical issue as i was able to takeover anyone account using this attack..
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the password-change endpoint accepted POST requests without a per-session anti-CSRF token or origin check, so any site could submit the form for a logged-in user.
What the attacker needed
Victim is logged in; victim loads attacker's page
How it was found
- Log in to the site with your own credentials.
- Open the change-password page.
- Turn on Burp interception, fill in the new email and password, and submit the form.
- Use the provided HTML PoC form that submits the same fields to the endpoint.
- Send the link to the victim so their browser submits the form while logged in.
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 report has not been written yet. The Original tab links to the source.
When you are logged in, your browser automatically sends your session cookie with every request to that site. If a form on another website can post to the password-change page, the site cannot tell your request apart from the attacker's. This is called cross-site request forgery (CSRF): the attacker makes your browser do the action for them.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.