# Cache poisoning via X-Forwarded-Host in www.shopify.com/partners/blog

Unkeyed cache poisoning via X-Forwarded-Host on Shopify partners blog let attacker rewrite absolute URLs in cached pages, hijacking social share links.

- Payout: $1,000
- Severity: low
- Program: Shopify
- Found by: dakitu
- Disclosed: 2020-09-11
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/977851
- Library page: https://bugbountylibrary.com/r/h1%3A977851
- Tags: area:web domain:web impact:integrity kind:bounty platform:hackerone sev:low tech:cdn technique:recon vuln:cache-poisoning vuln:host-header

**Target:** www.shopify.com/partners/blog/* (CDN-cached HTML pages)
**Root cause:** The CDN cache key ignored the X-Forwarded-Host header, but the origin reflected it into absolute URLs (e.g. Facebook share button) in the rendered HTML, so a poisoned response was served to all users.
**Steps:**
1. Send repeated requests to `https://www.shopify.com/partners/blog/7-web-design-and-development-awards-you-should-enter` with header `X-Forwarded-Host: your_hackerz_site.com` until the response body reflects the attacker host.
2. Stop sending the header and re-request the same URL; the cached response still contains `your_hackerz_site.com` in absolute links.
3. Fetch the poisoned page from a separate VPS to confirm the cache is shared and the FB share button now points to `https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2F<attacker-host>%2Fpartners%2Fblog%2F...`.
**How found:** Researcher looped requests with X-Forwarded-Host and noticed the value reflected in the response; then removed the header and observed the reflected value persisted, indicating the response was cached without the header in the cache key.
**Exploitation:** Attacker poisons the shared CDN cache for a public blog article by sending X-Forwarded-Host with their domain; subsequent visitors receive HTML whose absolute URLs (including the Facebook share button) point to the attacker's host, enabling link hijacking/phishing distribution.
**Insight:** When testing host-header reflection, always re-request without the header to check if the poisoned response was cached; unkeyed X-Forwarded-Host on CDN-fronted marketing/blog subdomains is a recurring cache-poisoning surface.

## Proof of concept (copied exactly from the original report)

**X-Forwarded-Host header poisoning request**

````
run in loop requests with```  X-Forwarded-Host: your_hackerz_site.com ``` - after some time You will notice in response ``` your_hackerz_site.com ```
````

**Poisoned Facebook share URL**

```
https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fa4129912adehq5m14ryflu01ovx68j0ur0ho6.burpcollaborator.net%2Fpartners%2Fblog%2F7-web-design-and-development-awards-you-should-enter
```

