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.
- 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 password" /> <input type="submit" value="Submit request" /> </form> </body> </html>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
- Create a malicious HTML page containing a form that posts to the forgot password endpoint.
- Set the email field to the malicious text and the reset field to the reset value.
- Trick a victim into visiting the page and submitting the form.
- 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.