Skip to content
XSS Disclosed report Beginner

Text Injection/ Content Spoofing on https://cloud.e.khanacademy.org by breaking out of input tag.

The utm_source and utm_medium query parameters were reflected into the page inside input tags without proper encoding, allowing an attacker to break out of the tag and inject arbitrary text. An attacker could use this to display misleading content on the trusted domain, potentially for phishing.

grassye Follow

Originally disclosed on HackerOne

  • Triaged in 2 days
  • Fixed in 16 days
  • Disclosed after 52 days

Hello security team,

Target: https://cloud.e.khanacademy.org/ Position: https://cloud.e.khanacademy.org/districts-demo-form?utm_source=INJECTION_HERE&utm_medium=INJECTION_HERE

Introduction: Content spoofing, also referred to as content injection, "arbitrary text injection" or virtual defacement, is an attack targeting a user made possible by an injection vulnerability in a web application. When an application does not properly handle user-supplied data, an attacker can supply content to a web application, typically via a parameter value, that is reflected back to the user. This presents the user with a modified page under the context of the trusted domain.

In order for the text to get injected, an attacker first need to break out of input tag because, the parameters with those values are reflected in the DOM inside input tags.So, an attacker can identify and simply break out of input tag by entering :( "> ) at the beginning of the text .Here, then only the injected text is visible to the screen and here it comes with the risk of phishing.

** Steps to Reproduce: 1.Go to https://cloud.e.khanacademy.org/districts-demo-form?utm_source=INJECTION_HERE&utm_medium=INJECTION_HERE, 2.Enter "> to close out of input tag in place of INJECTION_HERE, either as value of parameter:utm_source or utm_medium, 3. After the "> characters, enter anything you want to show to the victim in order to phish,

4.Observe below the submit button , the text after "> , is reflected in the page.

Impact

The attacker will play with the trust of victim and may fool him/her to enter credentials to attacker's site.This can't only be the case, there arises so many phishing scenarios and it also affects the reputation of the organization.

Attachments

The original report as published on HackerOne, by grassye. 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 application reflected user-controlled query parameters into HTML input attributes without encoding, allowing an attacker to close the tag and inject text.

Impact

An attacker could display arbitrary text on the trusted domain, which may be used to phish users and damage the organisation's reputation.

What the attacker needed

Victim clicks a crafted link

The fix

The application should encode reflected parameter values so they cannot break out of the input tag.

How it was found

  1. Open the districts-demo-form page with the utm_source and utm_medium parameters set.
  2. Replace the parameter value with a closing quote and angle bracket to end the input tag.
  3. Add the text you want the victim to see after those characters.
  4. Observe the injected text reflected on the page below the submit button.

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 a website takes something you typed in the address bar and puts it directly onto the page, it must treat it as plain text, not as part of the page's code. Here the site placed the value inside an HTML input element without escaping special characters, so typing a closing quote and angle bracket ended the input early and let the attacker add their own visible text. That fake text appears under the real site's address, which can trick people into trusting it.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More by grassye

View all

2 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 scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.