Skip to content
CSRF Disclosed report Beginner

CSRF token valid even after the session logout of a particular user

The anti-CSRF token remained valid after a user logged out and logged back in, so an attacker who obtained a token could reuse it to submit forms on the user's behalf. The report claims the token should be invalidated on logout.

anandpingsafe Follow

Originally disclosed on HackerOne

  • Disclosed after 4 months

Hi,

To reproduce the issue:

  1. Login to your https://secure.phabricator.com account and copy your Anti CSRF token.

  2. Now logout and again login after sometime.

  3. Open up your burp suite to modify the request and now submit any form with your old CSRF token.

The request will be completed.

So let's suppose i am somehow able to get CSRF token of a particular user then i can use the same token again and again to perform the attack.

The token should be thrown from the db after the session logout.

Please have a look.

Best regards, Anand

The original report as published on HackerOne, by anandpingsafe. 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 application does not invalidate or rotate the anti-CSRF token when the user's session is destroyed on logout.

Impact

An attacker who somehow obtained a user's CSRF token could reuse it repeatedly to perform actions as that user, even after the user logs out.

What the attacker needed

Attacker obtains the victim's CSRF token

How it was found

  1. Log in and copy the anti-CSRF token.
  2. Log out and log in again after some time.
  3. Use an intercepting proxy to submit a form with the old token.
  4. Observe that the request is accepted.

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 CSRF token is a secret value a website puts in forms to prove a request came from its own pages, not from another site. Here the token kept working even after the user logged out and back in, so anyone who stole a token could keep using it. The reporter says the token should be deleted when the session ends.

What is CSRF?

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

More by anandpingsafe

View all

19 more disclosed reports, best first.

More from Phabricator

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.