Skip to content
UI spoofing Disclosed report Beginner

Content Spoofing in udemy

A Udemy API endpoint echoed a value from the source_object_id parameter back inside an error message, so an attacker could craft a link that made the official site display arbitrary text. A victim following such a link could be tricked into believing the message came from Udemy and be led to an attacker-controlled site.

Anurag Jain Follow

Originally disclosed on HackerOne

  • Fixed in 7 months
  • Paid in 7 months
  • Disclosed after 10 months

Scenerio An attacker can include any arbitrary text using specially crafted udemy url. Reporting this but not sure if this is in scope (text injection not marked in exclusion list) Kindly mark it as informative in case if it is out of scope

Issue seems to be because of source_page=clp param. If this is removed text injection wont work. Also it seems error handling is not proper in case of source_object_id param since this vulnerability occur when you insert a string inside source_object_id param.

Steps

  1. Attacker distributed the below url by means of spamming or through his website

https://www.udemy.com/api-2.0/recommended-courses/?source_action=view&source_object=course&source_object_id=},{Kindly%20move%20to%20our%20new%20beta%20website%20evil.com&source_page=clp 2) Victim see below text

{"detail": "Invalid source object id: },{Kindly move to our new beta website evil.com"} 3) Since the text came from official site so user believes and gets into attacker trap

Resolution Crafted text should not be responded back in the response HTML

Attachments

ContentSpoofing.PNG
ContentSpoofing.PNG From the original on HackerOne

The original report as published on HackerOne, by csanuragjain. 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 API reflected the user-supplied source_object_id value into an error message without sanitising or encoding it.

Impact

An attacker could make the official site display arbitrary text, which could be used to mislead users into visiting a malicious site; the reporter was unsure whether the issue was in scope.

What the attacker needed

Victim clicks a crafted link; no account needed

How it was found

  1. The attacker builds a link to the recommended-courses API endpoint with a crafted source_object_id value and the source_page parameter set to clp.
  2. The attacker spreads the link through spam or a website.
  3. The victim opens the link and sees the injected text inside the error message.
  4. Because the text appears on the official Udemy site, the victim trusts it and may follow the attacker's instruction.

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.

Some websites put part of the address you typed into their error messages. If they do not clean that text first, an attacker can put their own words there, and the page looks like the real site is saying them. This is called content spoofing: no code runs, but the fake message can still fool people.

What is UI spoofing?

The interface lies to the user: a framed page catches their clicks, or a browser shows the wrong address or a fake prompt. Paid when it leads to a sensitive action or convincing phishing.

More by Anurag Jain

View all

63 more disclosed reports, best first.

More from Udemy

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Clickjacking and UI spoofing

The lesson behind this report.

The interface lies to the user: a framed page catches their clicks, or a browser shows the wrong address or a fake prompt. Paid when it leads to a sensitive action or convincing phishing.