# Using special IPv4-mapped IPv6 addresses to bypass local IP ban

IPv4-mapped IPv6 addresses in proxied AAAA records bypassed Cloudflare's banned-IP checks, enabling SSRF to loopback and internal hosts.

- Payout: $7,500
- Severity: critical
- Program: Cloudflare
- Found by: albertspedersen
- Disclosed: 2023-01-24
- Write-up quality: 7/10
- Original: https://hackerone.com/reports/1785260
- Library page: https://bugbountylibrary.com/r/h1%3A1785260
- Tags: area:devices domain:cloud domain:network impact:internal-access kind:bounty platform:hackerone sev:critical tech:go technique:chained technique:parser-differential vuln:access-control vuln:ssrf

**Target:** Cloudflare edge proxy / IP ban filter on proxied DNS records
**Root cause:** Go library interprets IPv4-mapped IPv6 addresses (::ffff:127.0.0.1) differently than the code's banned-IP check, so the filter only validated one representation.
**Steps:**
1. Create a proxied AAAA record pointing to `::ffff:127.0.0.1` (or `::ffff:10.0.0.1`).
2. Send an HTTP request through Cloudflare to that hostname.
3. Edge resolves the mapped address; banned-IP check misses it.
4. Connection is made to loopback/internal port, returning internal service response.
**How found:** Researcher noticed Cloudflare blocks banned IPs but hypothesized the check might not normalize IPv4-mapped IPv6 notation; tested AAAA records with `::ffff:` prefixes.
**Exploitation:** Attacker controls a proxied AAAA record with an IPv4-mapped IPv6 address; Cloudflare's edge connects to 127.0.0.1 or internal 10.x hosts, exposing HTTP services on the loopback interface and internal network.
**Insight:** When a filter bans IPs, test alternate textual representations of the same address (IPv4-mapped IPv6, octal, hex, IPv6 zone) against the parser actually used downstream—parser differential between the check and the connector is the bug.

