Skip to content
CSRF Disclosed report Beginner

Login CSRF : Login Authentication Flaw on https://liberapay.com/

The login confirmation endpoint lacked CSRF protection, so an attacker could craft a page that logs a victim into the attacker's account. The victim might then add sensitive payment or personal information to that account, which the attacker could see.

samjoy_26 Follow

Originally disclosed on HackerOne

  • Triaged in 4 days
  • Fixed in 20 days
  • Disclosed after 23 days

##Description: There is no csrf validation while logging in which leads to csrf. An attacker can craft an HTML page containing information to have the victim sign into an attacker's account, where the victim may add sensitive payment information to the attacker's new account assuming he/she is logged into the correct account, where in reality, the victim is signed into the attacker's account where the changes are visible to the attacker

##Steps to reproduce:

1-Login as Victim

2-Now as Attacker Go to Login page give attacker's email and an Account confirmation link will send to the attacker's email

3-Extract the value of id, Key and Token from the confirmation link and replace it in HTML File (POC)

<html> <!-- CSRF PoC - generated by Burp Suite Professional --> <body> <script>history.pushState('', '', '/')</script> <form action="https://liberapay.com/about/"> <input type="hidden" name="log&#45;in&#46;id" value="[Enter Id value]" /> <input type="hidden" name="log&#45;in&#46;key" value="[Enter Key value]" /> <input type="hidden" name="log&#45;in&#46;token" value="[Enter Token Value]" /> <input type="submit" value="Submit request" /> </form> </body> </html>

4-Send the script to the Victim to make them click then Victim now logged in to the attacker's account (After some time victim account gets logged out without any warning)

Note: The victim may add sensitive payment information to the attacker's new account and also Attacker can now see all activities of the victim including all sensitive information that the victim supplied to the account.

##Proof of concept: (video)

##Remediation: 1)When clicking on a signing link while you're already logged in, show a message like "You're already logged in as xxx. Do you want to sign in as yyy instead?

2)Limit CSRF tokens per IP, by including them in the token's payloads

Impact

1)The victim may add sensitive payment information to the attacker's new account

Poc-2.png
Poc-2.png From the original on HackerOne

2)Log any victim into the attacker account, the attacker can create a similar account profile as the victim - with some information missing, and then social-engineering (e.g. email) user to provide personal information or current password and can also monitor the victim activities.

3)The victim may add Personal Information and Organization Information to the attacker's new account

Poc-3.png
Poc-3.png From the original on HackerOne

The original report as published on HackerOne, by samjoy_26. 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

Impact

The victim could add sensitive payment or personal information to the attacker's account, and the attacker could monitor the victim's activity and use social engineering to obtain more information.

What the attacker needed

Attacker has an account; victim clicks a crafted link

The fix

The site should warn when a login link is opened while already logged in, and limit CSRF tokens per IP.

How it was found

  1. Log in as the victim.
  2. As the attacker, request a login confirmation link for the attacker's email.
  3. Extract the id, key and token values from the confirmation link.
  4. Place those values into an HTML form that submits to the site.
  5. Send the page to the victim and get them to click it.
  6. The victim is now logged into the attacker's account.

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 log in, the website should check that the request really came from you and not from another site. Here it did not, so an attacker could trick you into logging into their account without you noticing. Anything you then typed into that account, like payment details, would be visible to the attacker.

What is CSRF?

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

More from Liberapay

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.