fetch: SSRF guard misses RFC 6052 Well-Known NAT64 prefix (64:ff9b::/96) and ::/96
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 75/100
Línea de trabajo
Empieza en src/fetch/src/mcp_server_fetch/server.py y lee _NON_PUBLIC_NETWORKS y _is_public_address(). Comprueba cómo se prueban las entradas existentes IPv4-mapped y Local-Use NAT64; después, añade cobertura para los dos prefijos indicados y sus direcciones IPv4 privadas incrustadas. La tarea estará terminada cuando esas direcciones se rechacen y los destinos públicos mantengan el comportamiento esperado.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Which server?
fetch (mcp-server-fetch)
Server version
latest (post PR #5033 / v2/main)
How did you run the server?
uvx or pip (PyPI package)
Transport
stdio
Protocol era
Modern (2026-07-28)
MCP client and version
Claude Desktop / MCP Inspector
Operating system and runtime
Linux / macOS / Windows, Python 3.10+
Steps to reproduce
Following the merge of PR #5033 ("fix(fetch): refuse private, loopback and metadata addresses by default (#4838)"), _is_public_address() in src/fetch/src/mcp_server_fetch/server.py checks IP addresses against _NON_PUBLIC_NETWORKS.
- Start
mcp-server-fetch. - Request fetching a target whose resolved IPv6 address maps to an internal IPv4 address using RFC 6052 Well-Known Prefix NAT64 (
64:ff9b::/96) or deprecated IPv4-compatible IPv6 (::/96, RFC 4291).
Examples:64:ff9b::127.0.0.1(hex64:ff9b::7f00:1)64:ff9b::169.254.169.254(hex64:ff9b::a9fe:a9fe)::127.0.0.1
_is_public_address(ipaddress.ip_address("64:ff9b::127.0.0.1"))is evaluated.
Expected behavior
Under defense-in-depth egress filtering, addresses that translate/embed loopback, RFC 1918, link-local, or cloud metadata IPv4 addresses should be rejected by default, in the same manner as IPv4-mapped IPv6 (::ffff:0:0/96) and Local-Use NAT64 (64:ff9b:1::/48).
Actual behavior
In src/fetch/src/mcp_server_fetch/server.py, _NON_PUBLIC_NETWORKS includes:
ipaddress.ip_network("64:ff9b:1::/48")(RFC 8215 Local-Use IPv4/IPv6 Translation)ipaddress.ip_network("::ffff:0:0/96")(RFC 4291 IPv4-mapped IPv6)
However, it omits:
64:ff9b::/96(RFC 6052 Well-Known Prefix for IPv4/IPv6 translation)::/96(RFC 4291 IPv4-compatible IPv6)
Because standard Python ipaddress.IPv6Address("64:ff9b::127.0.0.1").is_global evaluates to True, _is_public_address() returns True, allowing the request to bypass the private destination refusal guard in dual-stack / NAT64 environments.
Logs or error output
>>> import ipaddress
>>> from mcp_server_fetch.server import _is_public_address
>>>
>>> # Currently blocked:
>>> _is_public_address(ipaddress.ip_address("127.0.0.1"))
False
>>> _is_public_address(ipaddress.ip_address("::ffff:127.0.0.1"))
False
>>>
>>> # Currently bypasses filter:
>>> _is_public_address(ipaddress.ip_address("64:ff9b::127.0.0.1"))
True
>>> _is_public_address(ipaddress.ip_address("64:ff9b::169.254.169.254"))
True
>>> _is_public_address(ipaddress.ip_address("::127.0.0.1"))
True
Already prototyped a fix?
Add both prefixes to _NON_PUBLIC_NETWORKS in src/fetch/src/mcp_server_fetch/server.py:
_NON_PUBLIC_NETWORKS: tuple[ipaddress.IPv4Network | ipaddress.IPv6Network, ...] = (
# ... existing networks ...
ipaddress.ip_network("64:ff9b::/96"), # Well-Known NAT64 Prefix (RFC 6052)
ipaddress.ip_network("64:ff9b:1::/48"), # Local-Use IPv4/IPv6 Translation (RFC 8215)
ipaddress.ip_network("::ffff:0:0/96"), # IPv4-mapped IPv6 (RFC 4291)
ipaddress.ip_network("::/96"), # IPv4-compatible IPv6 (RFC 4291)
)
(Or inspect the embedded 32-bit IPv4 address for any address falling into /96 translation scopes to re-verify against IPv4 private definitions).
Before you submit
- I searched existing issues and this is not a duplicate.
- This is not a security vulnerability report (those go through the private advisory form).
- Lenguaje dominante
- TypeScript
- Estrellas
- 91.4k
- Forks
- 11.8k
- Merge medio
- 7 h 36 min
- PR fusionados (30 d)
- 126
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de modelcontextprotocol/servers
-
bug server-time v2
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
modelcontextprotocol/servers#5182 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug server-filesystem v2
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
modelcontextprotocol/servers#5180 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
documentation v2
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
modelcontextprotocol/servers#5170 ·
Los mantenedores suelen responder en 1 día
-
documentation v2
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
modelcontextprotocol/servers#5164 ·
Los mantenedores suelen responder en 1 día
-
memory: persistence EISDIR test fails on Node 26.7 (the path suffix depends on the Node minor, not the major)Posiblemente ocupada @ace-ify la tomó hace 1 día. Abiertobug server-memory v2
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
modelcontextprotocol/servers#5162 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de modelcontextprotocol/servers
Issues similares
-
area: repo priority: P2 type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
appandflow/stim#4107 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Dificultad 1/5 1-3 horas Aptitud para principiantes 60/100
lingdojo/kana-dojo#32859 · 1 comentario · 5 reacciones ·
Los mantenedores suelen responder en 1 día
-
code-quality refactoring
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
github/gh-aw-firewall#10364 ·
Los mantenedores suelen responder en 1 día
-
Merge the duplicate kaffir_corn record into sorghumPosiblemente ocupada @Crypto-Shroom la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Crypto-Shroom/Bird-Feed-Calculator#322 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
drizzle-team/drizzle-orm#6552 ·
Los mantenedores suelen responder en 2 días