Skip to content
CSRF Disclosed report Beginner

The web app's forgot password page is vulnerable to text injection/content spoofing

The forgot password page reflects user-supplied text into the page without sanitisation, allowing an attacker to inject arbitrary content. Combined with the absence of CSRF protection, an attacker could trick a victim into submitting a crafted form that displays spoofed text, potentially leading them to call a phone number or send an email.

saurabhb Follow

Originally disclosed on HackerOne

  • Triaged in 9 days
  • Fixed in 6 months
  • Disclosed after 7 months

An attacker will exploit this by chaining it with CSRF (there is not protection against CSRF for that page) as scenario can only be created by a POST request. The attacker will target innocent users by doing this and some of them would fall in trap by calling the number or by sending the email. More about attack scenario at https://www.owasp.org/index.php/Content_Spoofing

Refer the attached image as proof of concept.

Also the proof of exploiting it using CSRF is:

<html> <body> <form action="https://www.khanacademy.org/forgotpw" method="POST"> <input type="hidden" name="email" value="<the malicous text will come here>" /> <input type="hidden" name="reset" value="Reset&#32;password" /> <input type="submit" value="Submit request" /> </form> </body> </html>

The original report as published on HackerOne, by saurabhb. 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 forgot password page reflects the email parameter into the response without output encoding, and the form lacks a CSRF token.

Impact

An attacker could spoof content on the forgot password page to trick users into calling a phone number or sending an email, but the report does not demonstrate script execution or account compromise.

What the attacker needed

Victim visits attacker page; victim submits the form

How it was found

  1. Create a malicious HTML page containing a form that posts to the forgot password endpoint.
  2. Set the email field to the malicious text and the reset field to the reset value.
  3. Trick a victim into visiting the page and submitting the form.
  4. The victim's browser sends the POST request and the page displays the injected text.

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 type something into a website and it shows it back to you, the site should clean it first. Here it does not, so an attacker can make the page show their own message. Because the form has no protection against being submitted from another site, an attacker can make a victim's browser send that message without the victim realising.

What is CSRF?

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

More by saurabhb

View all

10 more disclosed reports, best first.

More from Khan Academy

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.