Skip to content
SSRF Disclosed report Beginner

Server side request forgery on image upload for lists

The list image update feature accepted a user-supplied URL and fetched it server-side without validation, allowing an attacker to make the server connect to internal services. The error message revealed that the server reached localhost's SSH port, confirming SSRF.

eboda Follow

Originally disclosed on HackerOne

Bounty$50 View original
  • Triaged in 6 days
  • Fixed in 13 days
  • Paid in 13 days
  • Disclosed after 2 months

Summary

There is a Server-side request forgery when updating the image for a list.

Steps to reproduce

  1. Create a list and change its image. That will send a POST request to https://beta.instacart.com/api/v2/lists/[LIST_ID] with the following parameters:

list[remote_image_url]=https://example.com/yourimage.jpg


2. Change the  url to http://127.0.0.1:21 and you will get as response:

    ```{json}
{
	"meta":
	{
		"code": 400,
		"error_type": "List Error",
		"error_message": "There was an error while updating this list",
		"errors": ["Image could not download file: wrong status line: \"SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.3\""]
	}
}
Which shows that it tried to connect to the SSH port on localhost.

The original report as published on HackerOne, by eboda. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 4 min read.

What the report shows

The report's request goes to https://beta.instacart.com/api/v2/lists/[LIST_ID]. A list can carry an image, and the image can be supplied as a remote URL rather than an uploaded file. The report states there is a server-side request forgery when updating the image for a list.

The reproduction is short:

  1. Create a list and change its image. The client sends a POST request to the list endpoint with a remote_image_url parameter:

  2. Replace the URL with http://[redacted]:21. The server responds with an error that leaks what it received from the target port:

JSON
{
	"meta":
	{
		"code": 400,
		"error_type": "List Error",
		"error_message": "There was an error while updating this list",
		"errors": ["Image could not download file: wrong status line: \"SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.3\""]
	}
}

The banner in the error message shows the server tried to connect to the SSH port on localhost. The report records a bounty of 50.00 USD and was disclosed on 12 October 2016. It does not describe a fix, a severity rating or a CVSS score.

Root cause

The report does not explain the cause; the error shows the server attempted to download the supplied URL. The report shows the server connecting to loopback on port 21. The error message included the SSH banner received from the target port.

Impact

In this report the impact demonstrated is internal reachability plus information disclosure. The report demonstrates the server connecting to the SSH port on localhost and leaking its banner in the error.

How this kind of bug works

SSRF appears whenever a server-side component fetches a resource named by the user: image and file importers, link previews, PDF and screenshot generators, webhooks, RSS and feed readers, URL shorteners, XML parsers that resolve external entities, and anything that validates a URL by fetching it. The server sits inside the network perimeter and often has broader reach than the attacker, so a URL parameter becomes a proxy into internal space.

The bug class splits into two forms. In a blind SSRF the attacker only learns whether the request succeeded, usually through timing or error differences. In a full SSRF the response body comes back to the attacker. Here the body was not returned, but the SSH banner appeared in the error message.

Defences work at several layers: allow-list the schemes and hosts that may be fetched, resolve the hostname and reject loopback, link-local, private and otherwise reserved addresses, re-check the resolved address at connection time to defeat DNS rebinding, disable redirects or re-validate each hop, and avoid echoing raw upstream responses in errors.

How to test for it

  1. Find features that take a URL: profile and list images, avatars, imports, previews, webhook configuration, feed subscriptions, document conversion.
  2. Send a URL you control first and confirm the server actually fetches it, for example by watching your own listener for the request and its User-Agent.
  3. Point the parameter at loopback and at a port you know is closed, then at one that is likely open, and compare responses, timings and error text.
  4. Try alternate representations of the same address (decimal, octal, IPv6 forms, a hostname that resolves to loopback) to see whether filtering is textual only.
  5. If responses are reflected, try internal HTTP services and cloud metadata endpoints; if they are not, use timing and error differences to map what is reachable.

A positive result is a request arriving at your listener from the target's infrastructure, or a response that could only have come from an internal service. Common false positives are a fetch performed by your own browser rather than the server, a proxy or CDN in front of the target answering instead, cached content, and error messages that are generic rather than derived from the upstream response.

How it is fixed

Use an allow-list of permitted schemes and destinations where the feature allows it. Otherwise resolve the hostname, reject reserved and private ranges, and connect to the validated address rather than re-resolving. Disable or re-validate redirects, set short timeouts and size limits, and return generic errors that do not include upstream banners or headers. Running the fetcher in a segmented network with no route to internal management interfaces limits the damage when validation fails.

Hunting notes

URL-accepting parameters hide in less obvious places: image and avatar fields, CSV and bookmark importers, PDF renderers, link unfurling in chat and comments, monitoring and uptime checkers, and integrations that call back to a configured endpoint. Recon signals include parameters named url, uri, src, image, remote_*, callback, webhook and feed, and features that display content fetched from elsewhere.

To get a report accepted, show that the request came from the server, not the client, and demonstrate a concrete consequence: a banner, an internal page, a metadata response or a measurable timing difference. Keep the proof minimal and avoid touching sensitive internal systems beyond what is needed to show reachability.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 7 min read.

What happened, in plain words

Instacart is an online grocery service. Its website has a feature called a list, which is a collection of items you plan to buy. A list can have a picture attached to it, and instead of uploading a picture file, you can give the site a web address (a URL) and let Instacart fetch the picture from there.

The report states that the Instacart server fetches the image URL itself. The report shows the server connecting to a loopback address on port 21. This kind of bug is called server-side request forgery, or SSRF. The everyday comparison: imagine a hotel concierge who will fetch anything from any address you name. If you ask for something from the staff-only back office, the concierge can walk in and tell you what it saw. The concierge is the server, and you are the outsider.

The report was disclosed on 12 October 2016 and records a bounty of 50.00 USD. It does not describe a fix, a severity rating or a CVSS score.

What the report shows

The target is the list feature on beta.instacart.com. A list can carry an image, and the image can be supplied as a remote URL rather than an uploaded file. The report states that the server fetches that URL itself, which is a server-side request forgery.

The reproduction is short:

  1. Create a list and change its image. The client sends a POST request to the list endpoint with a remote_image_url parameter:

Line by line: POST is the method a browser uses to send data to a server, as opposed to GET, which asks for a page. The address is the API endpoint for a single list, identified by [LIST_ID]. The body carries one parameter, list[remote_image_url], whose value is the web address of the picture. The square brackets are a naming convention that groups the field under list. In plain terms: "here is a list, and here is the web address of the image to put on it."

  1. Replace the URL with http://[redacted]:21. The server responds with an error that leaks what it received from the target port:
JSON
{
	"meta":
	{
		"code": 400,
		"error_type": "List Error",
		"error_message": "There was an error while updating this list",
		"errors": ["Image could not download file: wrong status line: \"SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.3\""]
	}
}

What the address means: [redacted] is the loopback address, the way a computer refers to itself. :21 is a port number. Ports are numbered doors on a machine, and each service listens on its own door. Port 21 is traditionally used by FTP, but here an SSH service was answering. The response is JSON, a text format for structured data. code: 400 means the request was rejected. The interesting part is the errors array: the server tried to download the image, got something that was not an image, and pasted the first line of what it received into the error message. That line, SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.3, is the greeting an SSH server sends when a client connects. SSH is the protocol used to log in to servers remotely. So the Instacart server tried to connect to the SSH port on its own machine and returned the banner in the error.

The banner in the error message is the SSH greeting, showing the server tried to connect to the SSH port on localhost.

Root cause

The report does not explain the cause; the error shows the server attempted to download the supplied URL. The report shows the server connecting to loopback on port 21. The error message included the SSH banner received from the target port.

Impact

In this report the impact demonstrated is internal reachability plus information disclosure. The report demonstrates the server connecting to the SSH port on localhost and leaking its banner in the error.

In general, how this kind of bug works

SSRF appears whenever a server-side component fetches a resource named by the user: image and file importers, link previews, PDF and screenshot generators, webhooks, RSS and feed readers, URL shorteners, XML parsers that resolve external entities, and anything that validates a URL by fetching it. The server sits inside the network perimeter and often has broader reach than the attacker, so a URL parameter becomes a proxy into internal space.

The bug class splits into two forms. In a blind SSRF the attacker only learns whether the request succeeded, usually through timing or error differences. In a full SSRF the response body comes back to the attacker. Here the body was not returned, but the SSH banner appeared in the error message.

Defences work at several layers: allow-list the schemes and hosts that may be fetched, resolve the hostname and reject loopback, link-local, private and otherwise reserved addresses, re-check the resolved address at connection time to defeat DNS rebinding, disable redirects or re-validate each hop, and avoid echoing raw upstream responses in errors.

In general, how to test for it

  1. Find features that take a URL: profile and list images, avatars, imports, previews, webhook configuration, feed subscriptions, document conversion.
  2. Send a URL you control first and confirm the server actually fetches it, for example by watching your own listener for the request and its User-Agent.
  3. Point the parameter at loopback and at a port you know is closed, then at one that is likely open, and compare responses, timings and error text.
  4. Try alternate representations of the same address (decimal, octal, IPv6 forms, a hostname that resolves to loopback) to see whether filtering is textual only.
  5. If responses are reflected, try internal HTTP services and cloud metadata endpoints; if they are not, use timing and error differences to map what is reachable.

A positive result is a request arriving at your listener from the target's infrastructure, or a response that could only have come from an internal service. Common false positives are a fetch performed by your own browser rather than the server, a proxy or CDN in front of the target answering instead, cached content, and error messages that are generic rather than derived from the upstream response.

In general, how it is fixed

Use an allow-list of permitted schemes and destinations where the feature allows it. Otherwise resolve the hostname, reject reserved and private ranges, and connect to the validated address rather than re-resolving. Disable or re-validate redirects, set short timeouts and size limits, and return generic errors that do not include upstream banners or headers. Running the fetcher in a segmented network with no route to internal management interfaces limits the damage when validation fails.

In general, hunting notes

URL-accepting parameters hide in less obvious places: image and avatar fields, CSV and bookmark importers, PDF renderers, link unfurling in chat and comments, monitoring and uptime checkers, and integrations that call back to a configured endpoint. Recon signals include parameters named url, uri, src, image, remote_*, callback, webhook and feed, and features that display content fetched from elsewhere.

To get a report accepted, show that the request came from the server, not the client, and demonstrate a concrete consequence: a banner, an internal page, a metadata response or a measurable timing difference. Keep the proof minimal and avoid touching sensitive internal systems beyond what is needed to show reachability.

Glossary

  • URL: the address of something on the web, such as https://example.com/yourimage.jpg.
  • Server: a computer that answers requests from browsers and other clients.
  • Client: the program making a request, usually your browser.
  • Request: a message a client sends to a server asking it to do something.
  • POST: an HTTP method used to send data to a server, often to create or change something.
  • Parameter: a named value sent with a request, here list[remote_image_url].
  • Endpoint: a specific address on a server that accepts requests, here the list API path.
  • API: a defined way for programs to talk to a service.
  • JSON: a text format for structured data, using braces and key/value pairs.
  • SSRF (server-side request forgery): a bug where an attacker makes the server send a request to an address of the attacker's choosing.
  • Blind SSRF: an SSRF where the attacker cannot see the response, only infer success or failure.
  • Loopback address: [redacted], the address a computer uses to refer to itself.
  • Port: a numbered door on a machine where a particular service listens.
  • SSH: a protocol for logging in to and controlling servers remotely.
  • Banner: the identifying text a service sends when a client first connects.
  • Information disclosure: leaking information that should not be visible to the attacker.
  • Allow-list: a list of things that are explicitly permitted, with everything else refused.
  • DNS rebinding: a trick where a hostname resolves to a safe address during a check and to an internal address when the connection is made.
  • Cloud metadata endpoint: an internal address that cloud providers expose to give a machine information about itself, sometimes including credentials.
  • User-Agent: a header in a request that identifies the client software making it.
  • CDN: a network of servers that caches and delivers content on behalf of a site.
  • False positive: a result that looks like a bug but is not one.

More by eboda

View all

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