Files
Rip&TearandClaude Sonnet 5.5 c08008b624 fix(tools): default-deny non-global IPs in SSRF check (#7826)
* fix(tools): default-deny non-global IPs in SSRF check

is_blocked_ip used hand-written denylists that missed CGNAT
(100.64.0.0/10, incl. Alibaba metadata 100.100.100.200), 198.18.0.0/15,
Azure WireServer (168.63.129.16), and IPv6 forms wrapping private IPv4
(NAT64, 6to4).

Block anything that is not is_global, keep explicit entries for ranges
is_global may allow or that vary by Python version, and unwrap
IPv4-mapped and NAT64 (64:ff9b::/96) addresses so the embedded IPv4 is
checked. 6to4, Teredo and local-use NAT64 are non-global and blocked.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* docs(tools): note CGNAT is blocked by SSRF-safe scrape tools

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* fix(tools): block IPv6 transition ranges explicitly in is_blocked_ip

6to4 and local-use NAT64 were is_global=True before the CVE-2024-4032
fix (Python <3.10.15 / <3.11.10), so they relied on the interpreter to
be blocked. Add them, Teredo, IPv4-compatible (::/96), IPv4-translated
(::ffff:0:0:0/96) and deprecated site-local (fec0::/10) to the explicit
IPv6 list, which also closes forms is_global allows on every version.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-20 10:52:08 +05:30
..