# [h1-2102] FQDN takeover on all Shopify wholesale customer domains by trailing dot (RFC 1034)

Trailing-dot FQDN bypassed Shopify wholesale's duplicate-domain check, letting an attacker claim a customer's domain and serve arbitrary content on it.

- Payout: $3,100
- Severity: medium
- Program: Shopify
- Found by: intidc
- Disclosed: 2021-03-25
- Write-up quality: 8/10
- Original: https://hackerone.com/reports/1086108
- Library page: https://bugbountylibrary.com/r/h1%3A1086108
- Tags: area:web domain:web impact:data-leak impact:integrity kind:bounty platform:hackerone sev:medium technique:chained technique:recon vuln:misconfiguration vuln:subdomain-takeover

**Target:** Shopify wholesale custom domain configuration (wholesale-shops.shopifyapps.com CNAME)
**Root cause:** Domain uniqueness check compared raw strings, so `shop.inti.io.` (trailing dot, RFC 1034 absolute form) was treated as distinct from `shop.inti.io`, while DNS resolves both identically.
**Steps:**
1. Identify a wholesale shop domain whose CNAME points to `wholesale-shops.shopifyapps.com` (e.g. via reverse CNAME lookup on AlienVault OTX).
2. Attempt to add `shop.inti.io` in attacker's wholesale domain preferences — rejected as already attached to a store.
3. Instead add the trailing-dot form `shop.inti.io.` — accepted because the uniqueness check treats it as a different string.
4. Wait for DNS/SSL provisioning to propagate.
5. Access `https://shop.inti.io./accounts/sign_in` and observe attacker-controlled store content served on the victim's domain.
**How found:** Researcher knew the duplicate-domain check blocked re-adding an existing domain, then recalled RFC 1034 that a complete domain name ends with a trailing dot and that resolvers treat `example.com` and `example.com.` identically — hypothesized the string comparison would not normalize the dot and tried the trailing-dot form.
**Exploitation:** Attacker registers the trailing-dot variant of a victim's wholesale domain in their own Shopify wholesale store; Shopify provisions DNS/SSL for the FQDN, which resolves to the same host as the victim's domain, so attacker content is served at the victim's domain (with trailing dot). No DNS access needed.
**Insight:** Whenever a platform enforces uniqueness on hostnames/domains, test canonicalization variants: trailing dot (FQDN), case, IDN/punycode, and percent-encoding — any variant that resolves to the same host but compares unequal can hijack another tenant's domain binding.

