Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

security(everything): gzip-file-as-resource fetches any URL incl. private/metadata IPs by default; get-env dumps all of process.env into model context

Aperta
#5,130 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
backend, security

Direzione di ricerca

Read tools/gzip-file-as-resource.ts and tools/get-env.ts, then compare the gzip server's URL checks with the fetch server's private-address refusal. The issue proposes safe defaults for URL access and environment variables, with both settings documented in the server README. Done means private or metadata addresses are blocked by default, environment output does not expose all secrets by default, and the README explains the configuration.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug server-everything v2

Summary

Two hardening gaps in the everything demo server that matter because demo servers get copied into real deployments:

  1. gzip-file-as-resource has no SSRF protection (tools/gzip-file-as-resource.ts): GZIP_ALLOWED_DOMAINS defaults to empty (line 21), and the domain check only applies "when configured" (line 150) — so by default any http/https URL is fetched, private/link-local/metadata addresses included, with redirects not re-checked. This contrasts with the fetch server, which ships default private-IP refusal. Demo code gets forked; the asymmetry propagates.
  2. get-env dumps the entire process.env into the tool result (tools/get-env.ts:28-38, JSON.stringify(process.env, null, 2)) — any prompt-injection source that can phrase a tool call reads every secret in the process (API keys included) straight into the model context. Even for a debug demo, an allowlist (GET_ENV_ALLOWED_KEYS) or opt-in flag would prevent the demo from becoming a deployment exfiltration primitive.

Suggestions

  • gzip: reuse the fetch server's _is_public_address default-deny when the allowlist is empty (or default the allowlist to public-suffix-only behavior);
  • get-env: default to a safe allowlist (or require explicit opt-in), and document both knobs in the server README.

Static analysis of main @ bbb701e7; happy to PR either fix.


Chengzhi Yi (GitHub @Tardfyou) — [email protected]

Lingua principale
TypeScript
Stelle
91.4k
Fork
11.8k
Merge medio
6h 39m
PR unite (30g)
146

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di modelcontextprotocol/servers

Tutte le issue di modelcontextprotocol/servers

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.