When Password Reset Turns into a Privacy Leak: CSRF, IPs & a Lit
The password reset endpoint accepted form-encoded POST requests without any CSRF token, so an attacker could make a victim's browser trigger a reset. The resulting email sent the victim's IP address to the attacker, which could be geolocated.
Published on khoof.medium.com
While testing a web application (name hidden to protect the identity), We noticed something interesting — when you submit a password reset request, the account owner receives an email. Standard behavior, right?
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 reset endpoint lacked CSRF protection and accepted form-encoded content instead of only JSON, while the notification email disclosed the requester's IP.
Impact
An attacker could learn a victim's IP address and approximate location, enabling profiling or targeted phishing, though the report notes the IP could also be obtained by other means.
What the attacker needed
Victim visits attacker page; victim has an account
The fix
The reset endpoint should enforce CSRF protection, restrict accepted content types, and avoid emailing user IP addresses without verification.
How it was found
- Change the request content type from JSON to form-encoded and confirm the reset still succeeds.
- Build a page that auto-submits a hidden form to the reset endpoint with the victim's email.
- Get the victim to visit the page so their browser sends the request.
- Receive the reset email containing the victim's IP address.
- Look up the IP in a geolocation service to estimate location.
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 password reset form normally only works when you submit it yourself. Here the server did not check that the request came from its own site, so another website could quietly submit it for a visitor. The reset email then told the attacker the visitor's IP address, which is the number that identifies a device on the internet and can hint at where it is.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.