Skip to content
SSRF Disclosed report Intermediate

SVG parser loads external resources on image upload

An SVG image upload feature allowed an attacker to make the server fetch external resources by including an image element with an external URL. An attacker could use this to probe internal networks or make the server send requests to arbitrary hosts.

ogig Follow

Originally disclosed on HackerOne

  • Triaged in 6 days
  • Fixed in 7 months
  • Paid in 7 months
  • Disclosed after 7 months

Uploading SVG that include

 <image xlink:href="http://example.com/?evil=var" />

will cause the server side parser to try to fetch external resources.

I've tested in two ways. Creating an svg with an external loaded public google image that was rendered perfectly.

Also tested a private server with nc and created an svg that uses xlink for private url. I uploaded the svg and nc output was this.

Listening on [0.0.0.0] (family 0, port 3001)
Connection from [23.227.55.103] port 3001 [tcp/*] accepted (family 2, sport 49391)
GET /?evil=var HTTP/1.0
Host: 37.139.18.151:3001
Accept-Encoding: gzip

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

What the attacker needed

Ability to upload an SVG file

How it was found

  1. Create an SVG file that references an external URL using an image element.
  2. Upload the SVG to the vulnerable image upload feature.
  3. Observe that the server makes an HTTP request to the referenced URL.

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 upload an SVG, the server parses it and follows links inside the file, so an attacker could make the server visit a web address they chose. This is dangerous because the server might reach private systems.

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 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.