Why would an MCP example running on the local machine hand environment variables to a web page?
【AI安全】本机跑着的 MCP 示例,为什么会把环境变量交给网页
On October 25, the official MCP servers repository published GHSA-mvf5-2qqv-rg3c, stating that the affected HTTP transport in server-everything lacks authentication and has an overly permissive cross-origin configuration, and that the get-env tool returns process environment variables; the advisory rates it medium severity, and the fixed version is 2.0.1. The article explains that the default stdio transport is not affected by this HTTP exposure chain, and breaks the risk into four stages: the HTTP entry point is reachable, the page is permitted to read cross-origin responses, the request reaches a sensitive tool, and the return value crosses the data boundary. The author recommends validating Origin per the MCP transport specification and binding local services only to the loopback address with authentication configured, because tightening the listening address alone cannot block requests initiated by a local browser. When investigating, first confirm whether SSE or Streamable HTTP is actually enabled and record the package version and listening address, rather than printing the full environment variables.