Skip to content
SSRF Disclosed report Intermediate

Issues with uploading list images

The image upload feature for lists accepted a user-supplied URL and fetched it server-side, allowing an attacker to probe internal hosts and ports. By observing error messages, the attacker could infer open ports, SSH version, and the image processing library in use.

cablej Follow

Originally disclosed on HackerOne

  • Triaged in 27 hours
  • Fixed in 6 days
  • Paid in 6 days
  • Disclosed after 41 days

Hi,

There are several issues with uploading images for a list, i.e. with a PUT request to https://www.instacart.com/api/v2/lists/153253 and passing list[remote_image_url].

First, information about open ports and SSH information can be disclosed via different urls. For example, PUT-ing localhost:80 will return a 404 error, but localhost:1010 will return a connection refused error. PUT-ing localhost:22 will, return "Image could not download file: wrong status line: 'SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.3'", showing that OpenSSH version 6.6.1p1 is being used, which is outdated and may be vulnerable to published exploits.

Passing a value such as http://google.com will show that rmagick is being used, with an error: "Image must be a JPEG or PNG","Image Failed to manipulate with rmagick, maybe it is not an image? Original Error: unable to open file /tmp/magick-ezcF8DGU': No such file or directory @ error/constitute.c/ReadImage/583"`

Finally, uploading a JPG such as in [https://hackerone.com/reports/390] makes the server timeout and returns a 502 error, overflowing the memory. I have attached the image below.

Thanks for your time, and please let me know if you need any more information.

Attachments

The original report as published on HackerOne, by cablej. 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 server-side image fetcher did not restrict which URLs it would request, allowing access to internal network addresses and leaking details through error messages.

Impact

An attacker could scan internal ports and gather service version information, and a specially crafted image could cause a denial of service by exhausting server memory.

What the attacker needed

Ability to send PUT requests to the list endpoint; a list ID to target

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 website let you give it a web address for an image, and it would download that image for you. Because the server did the downloading, you could give it addresses that only the server can reach, like its own internal services. The error messages then told you whether those internal services were running and even what software they used.

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 cablej

View all

25 more disclosed reports, best first.

More from Instacart

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.