# Bypass of image rewriting / tracking blocker via srcset

Hey's tracking-pixel blocker rewrote img src but not srcset, letting attacker emails load remote images and leak victim IP to a tracking server.

- Payout: $1,000
- Severity: medium
- Program: Basecamp
- Found by: foobar7
- Disclosed: 2020-12-03
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/1021885
- Library page: https://bugbountylibrary.com/r/h1%3A1021885
- Tags: area:web domain:web impact:pii-leak kind:bounty platform:hackerone sev:medium tech:email technique:incomplete-fix vuln:info-disclosure vuln:misconfiguration

**Target:** Email HTML sanitizer / image-rewriting proxy in app.hey.com
**Root cause:** The image-rewriting filter only handled the `src` attribute and missed the `srcset` attribute (and other URL-bearing attributes like manifest/profile/doctype), so remote URLs in those attributes were not proxied through gopher.hey.com.
**Steps:**
1. Compose an HTML email to the victim containing `<img srcset="https://example.com/log?img-srcset">` and `<picture><img srcset="https://example.com/log?picture-img-srcset"></picture>`.
2. Also include URL-bearing attributes: `<!DOCTYPE html SYSTEM "https://example.com/log?doctype">`, `<html manifest="https://example.com/log?html-manifest">`, `<head profile="https://example.com/log?head-profile">`.
3. Send the email and open it in https://app.hey.com.
4. Observe the rendered DOM: `srcset` values remain pointing at example.com instead of being rewritten to gopher.hey.com.
5. Confirm the victim's browser issues requests directly to the attacker server, leaking IP.
**How found:** Researcher knew Hey rewrites img tags to gopher.hey.com to block trackers, then tested alternative URL-bearing attributes (srcset, manifest, profile, doctype) to see which the filter missed.
**Exploitation:** Attacker sends crafted HTML email; when victim opens it in Hey web app, the unrewritten srcset (and manifest/profile/doctype) URLs cause the victim's browser to fetch attacker-controlled resources, revealing the victim's IP address and confirming email opens.
**Insight:** When a proxy/sanitizer rewrites one attribute (src), enumerate every other attribute that can trigger a network fetch — srcset, manifest, profile, doctype SYSTEM, background, poster, etc. — since filters typically whitelist by attribute name and miss siblings.

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

**HTML email PoC with srcset tracking bypass**

```
<!DOCTYPE html SYSTEM "https://example.com/log?doctype">
    <html xmlns="http://www.w3.org/1999/xhtml" manifest="https://example.com/log?html-manifest">
    <head profile="https://example.com/log?head-profile">
    </head>
    <body>
    <picture>
        <img srcset="https://example.com/log?picture-img-srcset">
    </picture>
    <img srcset=",,,,,https://example.com/log?img-srcset">
    </body>
    </html>
```

