Skip to content
Misconfiguration Disclosed report Intermediate

HTTP-Response-Splitting on v.shopify.com

The shop parameter on a Shopify subdomain was reflected into the HTTP response without filtering carriage-return and line-feed characters, so an attacker could inject extra headers and a second response body. This could be used for cross-user defacement, cache poisoning, cross-site scripting and page hijacking, for example by presenting a cloned login page.

krankopwnz Follow

Originally disclosed on HackerOne

Bounty$500 View original
  • Triaged in 6 hours
  • Fixed in 10 hours
  • Paid in 23 days
  • Disclosed after 26 days

I discovered a HTTP-Response-Splitting issue on v.shopify.com

Steps to reproduce: Call the following URL in any browser and catch the response ( e.g. with burp ) https://v.shopify.com/last_shop?shop=krankopwnz.myshopify.com%0d%0aContent-Length:%200%0d%0a%0d%0aHTTP/1.1%20200%20OK%0d%0aContent-Type:%20text/html%0d%0aContent-Length:%2019%0d%0a%0d%0a<html>deface</html>

When you look at screenshot 1 in attachments, you can see that the response contains 2 headers.

According to OWASP, this could be used for " Cross-User Defacement, Cache Poisoning, Cross-site Scripting (XSS) and Page Hijacking." ( https://www.owasp.org/index.php/HTTP_Response_Splitting )

You could convince victims via social engineering to click the provided link, which can contain a cloned login-page of shopify for example. If he sits behind a proxy, which caches the responses the following users will see your evil login-page when calling that address.

A fix would be to disallow line-breaks and any non printable characters in the "shop"-parameter

Attachments

screenshot1-responseSplitting.jpg
screenshot1-responseSplitting.jpg From the original on HackerOne

The original report as published on HackerOne, by krankopwnz. 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 shop parameter was written into the response headers without rejecting carriage-return and line-feed characters, allowing header injection.

Impact

An attacker could use a crafted link for cross-user defacement, cache poisoning, cross-site scripting and page hijacking; the cache-poisoning effect only applies when a caching proxy sits in front of the victim.

What the attacker needed

Victim clicks a crafted link; victim behind a caching proxy for cache poisoning

How it was found

  1. Open the last_shop URL with a shop value containing encoded line breaks.
  2. Capture the response, for example with an intercepting proxy.
  3. Observe that the response contains two sets of headers.

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 a web server builds its reply, it separates the headers (metadata like content type) from the body with special line-break characters. If user input containing those characters is copied into the reply, an attacker can pretend the reply has ended and start a new one. Here the shop value was placed into the response unfiltered, letting an attacker add their own headers and a fake page.

What is Misconfiguration?

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.

More by krankopwnz

View all

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

Security misconfiguration

The lesson behind this report.

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.