CSRF Add Album On onpatient.com
The album-creation endpoint on onpatient.com accepted POST requests without validating the X-CSRFToken header, so a cross-site form could create an album in a logged-in victim's account. An attacker could trick a victim into submitting a crafted form and add an album named by the attacker.
Originally disclosed on HackerOne
- Triaged in 11 days
- Fixed in 19 days
- Paid in 19 days
- Disclosed after 10 months
Hi
I'm Found Bug CSRF It is Possible To Add Album By Attacker on onpatient.com
Steps to verify
- . Login as attacker
- . Go to photos and click add album
- . rename album for example :- hacking .
- . intercept this request add using burp proxy or any other tool (you can see X-CSRFToken and sessionid) attacker can add request on post without X-CSRFToken
- . Create Form HTML Exploit Add album
- . Send to Victim User
Form Exploitation
<html>
<body>
<form action="https://onpatient.com/photos/add_album/" method="POST">
<input type="hidden" name="name" value="hacking" />
<input type="submit" value="Add album Hacking" />
</form>
</body>
</html>
Response :- {"album": idalbum, "success": true}
Regards Hussain
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
Impact
An attacker could create an album in a logged-in victim's account without their consent, though the report does not show any further harm beyond that.
What the attacker needed
Victim is logged in; victim visits attacker page or clicks link
How it was found
- Log in as the attacker and open the photos section.
- Click add album and rename it, for example to a chosen name.
- Intercept the request with a proxy and note the CSRF token and session cookie.
- Replay the POST without the CSRF token to confirm it is accepted.
- Build an HTML form that posts to the add-album endpoint.
- Send the form to a victim user.
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.
Websites use a secret token in forms to prove a request came from their own pages, not from another site. Here the album-creation request did not check that token, so a page on a different site could make the victim's browser send the request while logged in. This is called cross-site request forgery (CSRF): the victim's own browser is tricked into performing an action.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.