Able to access private picture/video/writing when requesting for their JSON response
The endpoint for user pictures, videos, and posts returns different responses based on the Accept header. When JSON is requested, it fails to check if the requester is authorised, allowing an attacker to access private media by requesting the JSON version.
Originally disclosed on HackerOne
- Triaged in 34 hours
- Fixed in 4 days
- Paid in 35 hours
- Disclosed after 4 days
Description
Endpoint https://fetlife.com/users/{user-id}/pictures/{pic-id} has 2 types of responses, HTML and JSON. The type of response depends on Accept header of request it get. If request contains Accept: application/json, then it will return JSON response. Other than that, it returns HTML response.
When this endpoint returns JSON response, it does not check if requester is authorized to access requested resource. Therefore, attacker can access any private picture by requesting them in JSON response.
PoC
User trieulieuf9 has the following private assets
Picture: https://fetlife.com/users/14104003/pictures/120041856
Video: https://fetlife.com/users/14104003/videos/3102890
Post: https://fetlife.com/users/14104003/posts/7673012
We can access them with the following curl commands
Picture:
curl https://fetlife.com/users/14104003/pictures/120041856 -H "Cookie: _fl_sessionid={your-session}" -H "Accept: application/json" --user-agent "not cur1"
Video:
curl https://fetlife.com/users/14104003/videos/3102890 -H "Cookie: _fl_sessionid={your-session}" -H "Accept: application/json" --user-agent "not cur1"
Post:
curl https://fetlife.com/users/14104003/posts/7673012 -H "Cookie: _fl_sessionid={your-session}" -H "Accept: application/json" --user-agent "not cur1"
Limitation
Attacker needs to know asset IDs before the attack.
Impact
Attacker can access any private picture/video/post if he can somehow get their ID.
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 access any private picture, video, or post if they know its ID.
What the attacker needed
Know asset ID; valid session cookie
How it was found
- Identify a private picture, video, or post URL.
- Send a request to that URL with an Accept header for JSON and a valid session cookie.
- Receive the private content in the JSON response.
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.
A website has pages for pictures and videos. Normally, it checks if you are allowed to see them. But if you ask for the data in a computer-friendly format (JSON) instead of a normal web page, it forgets to check. So anyone who knows the link can see private content.
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.