Skip to content
CSRF Disclosed report Beginner

Unauthenticated CSRF(User can input any value for CSRF Token)

The registration and login pages accept a user-supplied CSRF token without server-side verification, only checking its length. An attacker could bypass CSRF protection by setting an arbitrary token value.

footstep Follow

Originally disclosed on HackerOne

  • Disclosed after 46 hours

Hello Veris, I believe you have implemented CSRF token on the registration for a reason. In my research, I found that a user supplied CSRF Token would be accepted and even saved in the browser cookie and will be the set token on subsequent request. This report is limited to the Register and Login page anyway. And most importantly, there is no verification of the CSRF token on the server side because if there is, the request shouldn't go through to talk of being saved in the browser cookie. The only verification I can see is if the inserted token is more than set 32 characters.

PoC:

  • Navigate to https://sandbox.veris.in/portal/register/
  • Fill the form and the captcha as required
  • Using a proxy tool, intercept the request (I'm using Burp Proxy)
  • Change the value of csrftoken in cookie field
  • Copy the same input and paste in csrfmiddlewaretoken
  • Forward the request
  • You'll get a 200 OK response

i.e Request made successfull

  • In the next request, change the value of csrftoken to the one used recently.
  • You could now check the value of cookie in the browser.
  • Bam! You found it.

I can provide a video proof if needed. I hope you understand

Thanks Shuaib Oladigbolu

The original report as published on HackerOne, by footstep. 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 server only checks the length of the submitted CSRF token and does not compare it to the token stored in the user's session.

Impact

CSRF protection on registration and login can be bypassed by supplying an arbitrary token value.

What the attacker needed

Access to the registration or login page; ability to intercept and modify requests

The fix

The server should verify that the submitted CSRF token matches the one stored in the user's session, not just check its length.

How it was found

  1. Navigate to the registration page and fill in the form and captcha.
  2. Intercept the request with a proxy tool.
  3. Change the csrftoken cookie value and set the same value in the csrfmiddlewaretoken field.
  4. Forward the request and observe a 200 OK response.
  5. In the next request, reuse the same token value and check the browser cookie.

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.

CSRF tokens are secret values a website puts in forms to prove a request came from its own pages, not from an attacker's site. Here the site accepted any token the user typed in, as long as it was long enough, so the protection was effectively missing.

What is CSRF?

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

More by footstep

View all

23 more disclosed reports, best first.

More from Veris

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.