Skip to content
CSRF Disclosed report Beginner

Login CSRF : Login Authentication Flaw

The registration confirmation link and the password reset link both logged the visitor straight into the account without asking for a password. An attacker could send their own confirmation or reset link to a victim, so the victim would silently be logged into the attacker's account and any information they entered there could later be read by the attacker.

japz Follow

Originally disclosed on HackerOne

  • Fixed in 27 hours
  • Disclosed after 15 days

Hi Team,

Domain: demo.weblate.org

In this bug, i have found a way to login any person to the attackers account, therefor when any user login to attackers account, the attacker can see the victims activity inside attackers account such as sensitive information. The issue relies on registration confirmation together with the password reset.

Steps to reproduce:

  1. Attacker create account
  2. Account confirmation will send to the attackers email
  3. Attackers will send the confirmation link to the victim
  4. Victim clicks the link and will automatically logged in to the attackers account.
  5. Done, victim will think that he/she is in his own account.

Now, how the attackers can view the information that the victim supplied to the account ? (let say the victim provided a password that the attackers do not know ? , this is where the flaw of the password reset will use, because password reset also automatically logged in the person who have the password reset link even without supplying the password.

Attackers steps to access the fake account on where the victim was logged-in

  1. Attacker go to reset password and perform reset since attacker originated the email address of the fake account.
  2. Password reset link will sent to attackers email.
  3. Attacker will click the reset link and will automatically logged in even did not supply the password.
  4. Done. Attacker and Victim now logged in in the same account.
  5. Attacker can now see all activities of the victim including all sensitive information that the victim supplied to the account.

Mitigation:

I have observed that the password creation was not enforced on the registration form and this will causes the issue on the 2 endpoints (registration and reset password).

Fix: PASSWORD should be enforced to create upon registration.

1. Regisration Endoiunt Fix: Now when the password is created upon registration, the confirmation link sent to email should be redirected to the login page, then the user should input the username and password first before continue logged in to the account.

2. Password Reset Fix: Now when anyone request password reset, the url link of reset password should redirect to the page that will require current, newpass, and confirm newpass, __BUT do not directly logged-in the account, after successfully changing the password it should also redirect to login page, then the user will input username and password before continue logged in to the account.

Let me know if you need more information.

Regards Japz

The original report as published on HackerOne, by japz. 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 confirmation and password reset endpoints issued an authenticated session directly from the emailed token, without requiring the user to supply a password first.

Impact

A victim could be silently logged into an attacker-controlled account, and the attacker could later read any sensitive information the victim entered there.

What the attacker needed

Attacker has an account; victim clicks the emailed link; victim enters data in the shared account

The fix

The confirmation and reset links should redirect to the login page and require the username and password before a session is created, rather than logging the visitor in directly.

How it was found

  1. The attacker creates an account and receives the confirmation email.
  2. The attacker sends the confirmation link to the victim.
  3. The victim clicks the link and is logged into the attacker's account.
  4. The attacker requests a password reset for the same account and receives the reset link.
  5. The attacker opens the reset link and is logged in without entering a password, so both parties share the session.
  6. The attacker reads the victim's activity and any information the victim entered.

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.

Normally, after you click a link in a confirmation email, the site should still ask you to type your username and password before letting you in. Here it did not: clicking the link was enough to be logged in. Because the attacker can send their own link to someone else, the victim ends up inside the attacker's account without realising it, and anything they type there is visible to the attacker.

What is CSRF?

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

More by japz

View all

43 more disclosed reports, best first.

More from Weblate

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.