CSRF on change video thumbnail at https://chaturbate.com
The video thumbnail change endpoint accepted a GET request without a CSRF token, so an attacker who knew a victim's video and thumbnail identifiers could make the victim's browser change the thumbnail. The attacker could only alter the thumbnail, not take over the account.
- Triaged in 14 hours
- Fixed in 5 days
- Paid in 14 hours
- Disclosed after 6 days
Hi
I noticed Changing video thumbnail option have the workflow with GET request and there is lack of csrf token on changing video thumbnail option,so if attacker somehow able to obtain the thumbnail_id of victim's video then it can help attacker to inducing victim to change video thumbnail.
Vulnerable Request:
GET /photo_videos/video/thumbnail/video_id/?thumb=thumbnail_id HTTP/1.1 Host: chaturbate.com
Steps to reproduce:
setup:- Video A :- an uploaded video on victim's account. video_id :- id of video A from victim's account thumbnail_id :- id of any thumbnail from video A.
- Configure the upper setup along with this url https://chaturbate.com/photo_videos/video/thumbnail/video_id/?thumb=thumbnail_id
- Feed the configured url to victim(as setup in step 1)
- Wait 5-9 minutes.
- Open your bio tab.
- Check, the video thumbnail will successfully get changed.
With Best Regards
Impact
Attacker can induce victim to change video's thumbnail.
Context
Chaturbate is a live webcam platform, and the report concerns the video feature on chaturbate.com. Uploaded videos have a thumbnail, the still image shown for the video, and the platform lets the owner pick which thumbnail is used. The researcher found that the request which performs that change is a plain GET and carries no CSRF token, so a third-party page can trigger it on behalf of a logged-in user.
Setup
The report describes the following preconditions:
- Video A: an uploaded video on the victim's account.
- video_id: the id of video A, taken from the victim's account.
- thumbnail_id: the id of any thumbnail belonging to video A.
The attacker needs both identifiers before the attack can be built. The report does not describe how they would be obtained; it only states that the attacker must somehow obtain the thumbnail_id of the victim's video.
Finding it
The researcher noticed that the change-thumbnail option is handled with a GET request and that the request contains no CSRF token. A state-changing action reachable by GET, with no anti-CSRF value tied to the user's session, can be triggered cross-site: the browser will attach the victim's cookies to a top-level navigation to the endpoint, and the server has nothing else to check.
The vulnerable request is:
GET /photo_videos/video/thumbnail/video_id/?thumb=thumbnail_id HTTP/1.1
Host: chaturbate.com
The path carries the video identifier, and the thumb query parameter carries the thumbnail identifier. Both are supplied by the caller, and no token accompanies them.
Exploitation
Step 1: build the URL
Configure the setup above into this URL, substituting the victim's video_id and the chosen thumbnail_id:
https://chaturbate.com/photo_videos/video/thumbnail/video_id/?thumb=thumbnail_id
Step 2: deliver it to the victim
Feed the configured URL to the victim, as set up in step 1. Because the action is a GET, the delivery can be a link or any navigation the attacker can induce; the report does not specify a particular delivery technique.
Step 3: wait
Wait 5 to 9 minutes.
Step 4: open the bio tab
Open your bio tab.
Step 5: confirm the change
The video thumbnail will have been successfully changed.
Root cause
The endpoint that changes a video's thumbnail performs a state change over GET and does not require a CSRF token. The report attributes the issue to the missing token on the change-thumbnail option; the use of GET for the action is what makes a cross-site navigation sufficient to reach it. With no token to validate, the server cannot distinguish a request the user intended from one a third party caused the victim's browser to send.
Impact
An attacker can induce a victim to change a video's thumbnail. The report frames this as conditional: the attacker must first obtain the thumbnail_id of the victim's video. The change is limited to selecting a thumbnail that already belongs to that video; the report describes no other effect.
Fix
The measure its finding points to is requiring a CSRF token on the thumbnail-change request, and not performing the state change on a GET.
Variants to test
- Other media-management actions: try thumbnail, cover-image and poster selection on other video or gallery features. A positive result is a state-changing request that succeeds from a cross-site navigation with no token.
- Identifier in the path: endpoints that take an object id in the path and a choice in a query parameter, as here, are easy to turn into a link. A positive result is the object's presentation changing after the victim loads the crafted URL.
- Delayed effects: this report needed a wait of 5 to 9 minutes before the change was visible. A positive result may only appear after a cache or processing delay, so re-check the object later rather than concluding the request failed.
Hunting notes
This kind of bug hides in secondary features: thumbnail selection, cover images and similar presentation settings that are easy to implement as a simple link. During recon, look for state-changing actions issued as GET and for requests whose parameters are all object identifiers with no token alongside them. The report establishes impact by naming the exact request, giving the identifiers needed, and walking through reproduction to the point where the thumbnail visibly changes.
What happened, in plain words
Chaturbate is a website where people broadcast live webcam shows. It also has a video feature: users can upload videos, and each uploaded video has a thumbnail, which is the small still picture shown as the video's cover. The owner of a video can choose which thumbnail is displayed.
The researcher found that the request the site uses to change that thumbnail is a plain GET request and carries no CSRF token. In everyday terms: the site accepts a simple link as the instruction to change the thumbnail, and it does not check that the person clicking the link really meant to do it. That means a page controlled by someone else can make a logged-in user's browser send that instruction, and the site will act on it.
This class of bug is called Cross-Site Request Forgery, or CSRF. The idea is like a hotel receptionist who accepts any written note that says "let this person into room 12" as long as it is on hotel paper, without checking who wrote it. The browser automatically attaches the user's login cookies to requests going to the site, so the site sees a logged-in user and has nothing else to verify.
Setup
The report describes three things the attacker needs before the attack can be built:
- Video A: an uploaded video on the victim's account.
- video_id: the id of video A, taken from the victim's account.
- thumbnail_id: the id of any thumbnail belonging to video A.
An id here is just a number or short code the site uses to refer to a specific object, the way a library uses a shelf number to refer to one book. The attacker needs both identifiers before the attack can be built. The report does not describe how they would be obtained; it only states that the attacker must somehow obtain the thumbnail_id of the victim's video.
Finding it
The researcher noticed that the change-thumbnail option is handled with a GET request and that the request contains no CSRF token.
Two concepts matter here. A GET request is the kind of request a browser makes when you click an ordinary link or type an address into the address bar. It is meant for fetching a page, not for changing anything. A CSRF token is a secret, random value that the site puts into forms and checks when they are submitted, so the server can tell that the request came from a page the site itself served, not from somewhere else. A cookie is a small piece of data the browser stores for a site and sends back with every request to that site; it is how the site remembers that you are logged in.
A state-changing action reachable by GET, with no anti-CSRF value tied to the user's session, can be triggered cross-site: the browser will attach the victim's cookies to a top-level navigation to the endpoint, and the server has nothing else to check. In other words, if the victim is logged in and loads a link to this address, the browser sends the victim's login cookie along with it, and the site happily performs the change.
The vulnerable request is:
GET /photo_videos/video/thumbnail/video_id/?thumb=thumbnail_id HTTP/1.1
Host: chaturbate.com
Line by line:
GET /photo_videos/video/thumbnail/video_id/?thumb=thumbnail_id HTTP/1.1is the request line.GETis the method, the kind of request. The path/photo_videos/video/thumbnail/video_id/points at the thumbnail-setting feature for one particular video, wherevideo_idis a placeholder for the real id. The part after the?is the query string, a set of extra values sent with the request; herethumb=thumbnail_idsays which thumbnail to use, withthumbnail_idas a placeholder for the real id.HTTP/1.1is the version of the protocol being spoken.Host: chaturbate.comtells the server which website the request is for. One server can host many sites, so the browser names the one it wants.
The path carries the video identifier, and the thumb query parameter carries the thumbnail identifier. Both are supplied by the caller, and no token accompanies them. That is the whole problem: the request is a complete instruction to change something, and it contains nothing that proves the user intended it.
Exploitation
Step 1: build the URL
Configure the setup above into this URL, substituting the victim's video_id and the chosen thumbnail_id:
https://chaturbate.com/photo_videos/video/thumbnail/video_id/?thumb=thumbnail_id
This is the same request as before, written as a full web address. https:// means the connection is encrypted, chaturbate.com is the site, and the rest is the path and query string. The attacker replaces the two placeholders with the real ids so that the address points at the victim's video and at a thumbnail that belongs to it. The reason for doing this is that the address itself is the attack: anyone who loads it while logged in performs the change.
Step 2: deliver it to the victim
Feed the configured URL to the victim, as set up in step 1. Because the action is a GET, the delivery can be a link or any navigation the attacker can induce; the report does not specify a particular delivery technique. The reason this works is that the victim's browser does not know the difference between a link the victim chose and a link someone else put in front of them; either way it sends the request with the victim's cookies attached.
Step 3: wait
Wait 5 to 9 minutes. The report gives no reason for the wait.
Step 4: open the bio tab
Open your bio tab. Open your bio tab.
Step 5: confirm the change
The video thumbnail will have been successfully changed. Seeing the new thumbnail in the bio tab is the proof that the request went through without the user ever intending it.
Root cause
The endpoint that changes a video's thumbnail performs a state change over GET and does not require a CSRF token. The report attributes the issue to the missing token on the change-thumbnail option; the use of GET for the action is what makes a cross-site navigation sufficient to reach it. With no token to validate, the server cannot distinguish a request the user intended from one a third party caused the victim's browser to send.
Impact
An attacker can induce a victim to change a video's thumbnail. The report frames this as conditional: the attacker must first obtain the thumbnail_id of the victim's video. The change is limited to selecting a thumbnail that already belongs to that video; the report describes no other effect.
Fix
The measure its finding points to is requiring a CSRF token on the thumbnail-change request, and not performing the state change on a GET.
Variants to test
- Other media-management actions: try thumbnail, cover-image and poster selection on other video or gallery features. A positive result is a state-changing request that succeeds from a cross-site navigation with no token.
- Identifier in the path: endpoints that take an object id in the path and a choice in a query parameter, as here, are easy to turn into a link. A positive result is the object's presentation changing after the victim loads the crafted URL.
- Delayed effects: this report needed a wait of 5 to 9 minutes before the change was visible. A positive result may only appear after a cache or processing delay, so re-check the object later rather than concluding the request failed.
Hunting notes
This kind of bug hides in secondary features: thumbnail selection, cover images and similar presentation settings that are easy to implement as a simple link. During recon, look for state-changing actions issued as GET and for requests whose parameters are all object identifiers with no token alongside them. The report establishes impact by naming the exact request, giving the identifiers needed, and walking through reproduction to the point where the thumbnail visibly changes.
Glossary
- API: a way for one piece of software to talk to another, sending requests and getting answers back.
- Cookie: a small piece of data a website stores in your browser and that your browser sends back with every request to that site, often used to remember that you are logged in.
- CSRF (Cross-Site Request Forgery): an attack where a page controlled by someone else makes your browser send a request to a site you are logged in to, so the site acts as if you asked.
- CSRF token: a secret random value the site includes in forms and checks on submission, proving the request came from the site itself.
- Endpoint: a specific address on a server that performs a particular action.
- GET: the request method a browser uses for ordinary links and address-bar visits, meant for fetching pages rather than changing data.
- Host: the part of a request that names which website the request is for.
- HTTP: the protocol browsers and servers use to exchange requests and responses.
- HTTPS: HTTP with encryption, so the connection cannot be read or altered in transit.
- Id: a number or short code a site uses to refer to a specific object, such as a video or a thumbnail.
- Path: the part of a URL after the site name that points at a particular feature or resource.
- Query parameter: a name and value pair after the
?in a URL, used to pass extra information with the request. - Recon: the information-gathering phase of security testing, where you look at how a site is built and behaves.
- Request: a message a browser sends to a server asking it to do something.
- State change: any action that alters stored data, such as changing a setting or deleting something.
- Thumbnail: the small still image shown as the cover for a video.
- Top-level navigation: when the browser loads a new page in the main window, for example after clicking a link.
- URL: the full web address of a page or resource.