Skip to content
SSRF Disclosed report Intermediate

Bypass for blind SSRF #281950 and #287496

The report shows two blind SSRF reports could be bypassed using IPv6/IPv4 address embedding to reach localhost, forcing the server to make requests.

7001 Follow

Originally disclosed on HackerOne

  • Triaged in 30 hours
  • Fixed in 2 days
  • Disclosed after 10 months

Hello, when checking these 2 reports #281950 and #287496 i found that it can be bypassed using IPv6/IPv4 Address Embedding

Steps to reproduce: 1-access this link https://infogram.com/api/web_resource/url?q=http://[0:0:0:0:0:ffff:127.0.0.1]

POC:

ssrf_bps.PNG
ssrf_bps.PNG From the original on HackerOne

Refrences: http://www.tcpipguide.com/free/t_IPv6IPv4AddressEmbedding.htm https://github.com/swisskyrepo/PayloadsAllTheThings/tree/master/Server%20Side%20Request%20Forgery

Impact

Server Side Request Forgery or SSRF is a vulnerability in which an attacker forces a server to perform requests on their behalf.

The original report as published on HackerOne, by 7001. 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 target is Infogram, and the feature in question is an endpoint that fetches a URL supplied by the caller. The researcher had previously submitted two reports, #281950 and #287496, about server-side request forgery on this endpoint. While re-checking those reports, the researcher found that the earlier fix could be bypassed by expressing the loopback address in IPv6/IPv4 embedded form.

The reproduction is a single step: open the following link.

HTTP
https://infogram.com/api/web_resource/url?q=http://[[redacted].0.0.1]

The q parameter carries a URL whose host is written as [[redacted].0.0.1], an IPv6 literal that embeds the IPv4 loopback address [redacted]. The researcher states that this bypasses the protection added for the two earlier reports.

ssrf_bps.PNG
ssrf_bps.PNG From the original on HackerOne

The screenshot, named ssrf_bps.PNG, is the proof of concept included with the report.

The report cites two references for the technique: a page on the TCP/IP Guide about IPv6/IPv4 address embedding, and the Server Side Request Forgery section of the PayloadsAllTheThings repository.

The report is rated low severity and was disclosed on 24 May 2020. It does not record a bounty, a CVSS score or the specific fix applied afterwards.

Root cause

A plausible explanation is that the endpoint's validation worked on the textual form of the host rather than on the address the server would connect to. A filter that blocks [redacted], or resolves a hostname and checks the result, can still be defeated when the host is an IPv6 literal that embeds the IPv4 address. The embedded form [redacted].0.0.1 is the IPv4-mapped IPv6 representation of [redacted], so a check that only recognises the dotted-quad string misses it, while the network stack still routes the connection to loopback.

Impact

As the report describes it, an attacker can force the server to perform requests on their behalf. Because the bypass targets loopback, the requests would originate from the server itself. The report does not enumerate which internal services were reachable or what data could be read; it demonstrates that the restriction from the earlier reports can be circumvented.

How this kind of bug works

SSRF arises whenever an application takes a URL from user input and makes a server-side request to it. If the destination is not constrained, the attacker can point the request at internal addresses: loopback, private ranges, link-local addresses such as cloud metadata endpoints, or internal hostnames that are not reachable from the internet. The server becomes a proxy that carries the attacker's request past the network perimeter.

Bypasses usually target the gap between how the input is validated and how it is used. Common tricks include alternative representations of the same address (decimal, octal, hexadecimal, IPv6 forms, IPv4-mapped IPv6), DNS names that resolve to internal addresses, redirects from an allowed host to a forbidden one, and URL parsing differences between the validator and the HTTP client. The defence that holds is not string matching but resolving the host and checking the resulting address against a deny list at connection time, ideally combined with network-level egress controls so that even a successful bypass cannot reach sensitive services.

How to test for it

  1. Find features that fetch a URL server-side: link previews, image or file importers, webhooks, PDF and screenshot generators, RSS or feed readers, URL unfurlers, and any parameter that looks like a URL.
  2. Establish a baseline with a URL you control and confirm the server actually makes the request, for example by watching your own listener for an inbound connection.
  3. Point the parameter at loopback and private addresses in several representations: the plain dotted quad, the IPv4-mapped IPv6 form used here, other IPv6 spellings, decimal and octal encodings, and a hostname you control that resolves to an internal address.
  4. Try redirects: a URL on an allowed host that responds with a redirect to an internal address tests whether validation happens before or after following redirects.
  5. A positive result is a response, timing difference or outbound connection that proves the server reached the internal destination. Blind cases show up as delays, error messages that differ from the baseline, or a hit on your listener when the redirect target is yours.
  6. Watch for false positives: a generic error page, a cached response, or a request made by your own browser rather than the server. Confirm the origin of the traffic before reporting.

How it is fixed

Resolve the hostname and validate the resolved IP address against a deny list covering loopback, private, link-local and other reserved ranges, and do the check at the point of connection so that DNS rebinding and redirects cannot slip past it. Disable or tightly control redirects in the fetching client. Where possible, route outbound fetches through a proxy that enforces the same policy, and apply network egress rules so internal services are not reachable from the application tier at all. Reject non-standard address encodings rather than trying to enumerate them.

Hunting notes

This class hides in any feature that accepts a URL and acts on it server-side, especially importers and preview generators that were added for convenience. Recon signals include parameters named url, q, link, src, image, feed or callback, and endpoints under paths such as /api/ that take a full URL. When a program has already fixed an SSRF report, revisiting the same endpoint with alternative address encodings is a productive line of attack, as this report shows. To get a report accepted, demonstrate the request reaching a destination it should not, keep the proof minimal and reproducible, and state clearly what the server did on its behalf.

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

The endpoint shown takes a web address (a URL) as input. This is a common convenience: instead of you uploading a picture, you paste a link and the server downloads it for you.

That feature is where the bug lives. The researcher had already reported two earlier problems with it, numbered #281950 and #287496, both about server-side request forgery (explained below). The researcher states the protection added for those reports can be bypassed. While re-checking the old reports, the researcher found the fix could be worked around by writing the same address in a different way.

The whole reproduction is one link:

HTTP
https://infogram.com/api/web_resource/url?q=http://[[redacted].0.0.1]

Reading it piece by piece:

  • https://infogram.com/api/web_resource/url is the endpoint, the specific part of Infogram's site that handles fetching a web resource. The path starts with /api/, which usually marks a machine-facing interface rather than a page meant for people.
  • ?q= starts the query string, the part of a URL that carries input. Here the parameter is named q, and everything after the equals sign is its value.
  • http://[[redacted].0.0.1] is the value: a URL whose host is written in a long IPv6 form. [redacted] is the loopback address, the address a computer uses to talk to itself. The bracketed form [[redacted].0.0.1] is an IPv6 address that embeds that same IPv4 loopback address inside it.

So the request asks Infogram's server to fetch a URL that, underneath the unusual spelling, points at the server itself. The researcher states that this gets past the protection added for the two earlier reports.

ssrf_bps.PNG
ssrf_bps.PNG From the original on HackerOne

The screenshot, named ssrf_bps.PNG, is the proof of concept included with the report.

The report points to two references for the technique: a page on the TCP/IP Guide about IPv6/IPv4 address embedding, and the Server Side Request Forgery section of the PayloadsAllTheThings repository.

The report is rated low severity and was disclosed on 24 May 2020. It does not record a bounty, a CVSS score or the specific fix applied afterwards.

Why the bypass works

A plausible explanation is that the endpoint checked the URL as text rather than the address the server would connect to. A filter that blocks the string [redacted], or that looks up a hostname and inspects the answer, can still be fooled when the host is an IPv6 literal with the IPv4 address tucked inside it. The form [redacted].0.0.1 is the IPv4-mapped IPv6 representation of [redacted], so a check that only recognises the familiar dotted-quad string misses it, while the network stack still sends the connection to loopback.

A useful comparison: a bouncer with a list of banned names will let in the same person who writes their name differently on the guest list. The person is identical; only the spelling changed.

Impact

As the report describes it, an attacker can force the server to perform requests on their behalf. Because the bypass targets loopback, those requests would come from the server itself. The report does not enumerate which internal services were reachable or what data could be read; it demonstrates that the restriction from the earlier reports can be circumvented.

In general, how this kind of bug works

Server-side request forgery (SSRF) happens whenever an application takes a URL from user input and makes a request to it from the server. If the destination is not constrained, the attacker can aim the request at internal addresses: loopback, private network ranges, link-local addresses such as cloud metadata endpoints, or internal hostnames that are not reachable from the internet. The server becomes a proxy that carries the attacker's request past the network perimeter, like a delivery driver who will take a parcel to any address on the building's internal mail list because the sender wrote it on the label.

Bypasses usually target the gap between how the input is validated and how it is used. Common tricks include alternative representations of the same address (decimal, octal, hexadecimal, IPv6 forms, IPv4-mapped IPv6), DNS names that resolve to internal addresses, redirects from an allowed host to a forbidden one, and URL parsing differences between the validator and the HTTP client. The defence that holds is not string matching but resolving the host and checking the resulting address against a deny list at connection time, ideally combined with network-level egress controls so that even a successful bypass cannot reach sensitive services.

In general, how to test for it

  1. Find features that fetch a URL server-side: link previews, image or file importers, webhooks, PDF and screenshot generators, RSS or feed readers, URL unfurlers, and any parameter that looks like a URL.
  2. Establish a baseline with a URL you control and confirm the server actually makes the request, for example by watching your own listener for an inbound connection.
  3. Point the parameter at loopback and private addresses in several representations: the plain dotted quad, the IPv4-mapped IPv6 form used here, other IPv6 spellings, decimal and octal encodings, and a hostname you control that resolves to an internal address.
  4. Try redirects: a URL on an allowed host that responds with a redirect to an internal address tests whether validation happens before or after following redirects.
  5. A positive result is a response, timing difference or outbound connection that proves the server reached the internal destination. Blind cases show up as delays, error messages that differ from the baseline, or a hit on your listener when the redirect target is yours.
  6. Watch for false positives: a generic error page, a cached response, or a request made by your own browser rather than the server. Confirm the origin of the traffic before reporting.

In general, how it is fixed

Resolve the hostname and validate the resolved IP address against a deny list covering loopback, private, link-local and other reserved ranges, and do the check at the point of connection so that DNS rebinding and redirects cannot slip past it. Disable or tightly control redirects in the fetching client. Where possible, route outbound fetches through a proxy that enforces the same policy, and apply network egress rules so internal services are not reachable from the application tier at all. Reject non-standard address encodings rather than trying to enumerate them.

In general, where to look

This class hides in any feature that accepts a URL and acts on it server-side, especially importers and preview generators that were added for convenience. Recon signals include parameters named url, q, link, src, image, feed or callback, and endpoints under paths such as /api/ that take a full URL. When a program has already fixed an SSRF report, revisiting the same endpoint with alternative address encodings is a productive line of attack, as this report shows. To get a report accepted, demonstrate the request reaching a destination it should not, keep the proof minimal and reproducible, and state clearly what the server did on its behalf.

Glossary

  • URL: the address of something on the web, such as https://infogram.com/api/web_resource/url.
  • Endpoint: one specific address on a service that performs a particular action, as opposed to a whole website.
  • Parameter: a named piece of input in a URL, here q, whose value follows the equals sign.
  • Query string: the part of a URL after the ? that carries input values.
  • API: an interface built for programs to talk to a service, usually under a path like /api/.
  • Server: a computer that provides a service and answers requests from other computers.
  • Request: a message one computer sends to another asking it to do something, such as fetch a page.
  • SSRF (server-side request forgery): a bug where an attacker makes a server send a request to a destination of the attacker's choosing.
  • Loopback address: the address a computer uses to reach itself, [redacted] in IPv4.
  • IPv4: the older addressing scheme where addresses look like four numbers separated by dots, such as [redacted].
  • IPv6: the newer addressing scheme with longer addresses written in groups of hexadecimal digits separated by colons.
  • IPv4-mapped IPv6 address: an IPv6 address that carries an IPv4 address inside it, such as [redacted].0.0.1.
  • Dotted quad: the familiar four-number IPv4 spelling, [redacted].
  • Bypass: a way of getting around a protection that is in place.
  • Filter / deny list: a rule that blocks certain inputs, here certain addresses.
  • DNS: the system that translates human-readable hostnames into numeric addresses.
  • DNS rebinding: a trick where a hostname resolves to an allowed address during a check and to a forbidden one when the request is actually made.
  • Redirect: a response telling the client to go to a different address instead.
  • Private range: address blocks reserved for internal networks and not routable on the public internet.
  • Link-local address: an address valid only on the local network segment.
  • Cloud metadata endpoint: an internal address that cloud platforms expose to their own machines, sometimes holding credentials.
  • Egress control: a network rule limiting where a server is allowed to send outgoing traffic.
  • Proof of concept (POC): a minimal demonstration that a bug is real.
  • Severity: a rating of how serious a bug is, here low.
  • CVSS: a standard scoring system for vulnerability severity; this report does not record a score.

More from Infogram

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.