Skip to content
CSRF Disclosed report Beginner

CSRF on delete friend requests - Not protected with CSRF Token

The endpoint that cancels a sent friend request accepts POST requests without a CSRF token, so a page on another site can make a logged-in user cancel a request. An attacker could trick a victim into cancelling a pending friend request to a specific user.

sbakhour Follow

Originally disclosed on HackerOne

Informational View original
  • Disclosed after 3 days

Summary by the program

Hi, We don't put CSRF tokens on all our endpoints because we don't consider it's a security issue in all cases. In the present example, the only thing you could do is trick the user into clicking on a bunch of links making him cancel all his friend requests one by one. We think everyone agrees that's very unlikely to happen and really not worth anyone wasting time for this. We are disclosing this issue hoping that it will not be submitted again. Regards, The xvideos team

The report

Summary:

Hello XVideos Security Team,

The is a possibility of CSRF on the POST method when deleting friend requests that are sent by the users. Any user can send the malicious contents to perform the post method in order to delete a friend request for a specific member.

Steps To Reproduce:

  1. Login with your XVideos account and add the X user as a friend
  2. Go to your friends request sent and validate that the request is there on https://www.xvideos.com/account/friends/requests/sent
  3. Select the user X that you want to delete then click on the button next to Cancel: "Checked" or "All"
  4. Intercept the request when the pop up message appear & after you click OK.
  5. Notice that this POST request to cancel the friend request is not protected by a CSRF token
  6. Using Burp Professional , right click on this request and under engagement tools select "Generate CSRF POC"
  7. Copy the HTML contents into a new HTML page as a proof of concept.
  8. Send this CSRF HTML page to the victim to delete the friend request of this specific X user
  9. Notice that the request deletes the Friend request.

Supporting Material/References:

Refer to the attached video for more details

##Mitigation: Add a CSRF token for the POST method to cancel or delete friend requests so it can be done only by the logged in user to confirm the activity.

Impact

Attackers can send Victims this malicious content to victims to delete sent friend requests of specific users before they get accepted.

The original report as published on HackerOne, by sbakhour. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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 state-changing POST endpoint for cancelling a sent friend request did not require or validate a CSRF token.

Impact

An attacker could trick a logged-in victim into cancelling a pending friend request to a specific user, but the program judged the practical impact very low.

What the attacker needed

Victim has a pending sent friend request; victim is logged in; victim visits attacker page or clicks link

The fix

The endpoint should require a valid CSRF token for the POST request that cancels a friend request.

How it was found

  1. Log in and send a friend request to a chosen user.
  2. Open the sent friend requests page and confirm the request is listed.
  3. Select that user and trigger the cancel action.
  4. Intercept the resulting POST request and observe it has no CSRF token.
  5. Generate a CSRF proof-of-concept HTML page from the request.
  6. Send the page to a victim and observe the friend request is cancelled.

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 to a site, your browser sends your session cookie with every request to that site. If a request that changes something does not include a secret token tied to your session, another website can make your browser send that request without you knowing. Here, cancelling a friend request had no such token, so a malicious page could cancel one for you.

What is CSRF?

Another site makes a signed-in user's browser perform an action they did not intend.

More by sbakhour

View all

4 more disclosed reports, best first.

More from XVIDEOS

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site request forgery (CSRF)

The lesson behind this report.

Another site makes a signed-in user's browser perform an action they did not intend.