Summary
Microsoft UFO's Linux MCP server does not validate browser-origin headers before accepting requests on its localhost HTTP endpoint. A malicious web page may use DNS rebinding to reach that endpoint and, when a valid UFO_MCP_API_KEY is available, enumerate tools or invoke commands as the victim's user.
Affected context
The issue occurs in deployments using the Linux MCP server with its streamable HTTP service bound to localhost:8010. Risk increases when a browser can access the service, the server does not validate Host, Origin, or Sec-Fetch-Site headers, and an attacker-controlled page can cause requests to reach the local /mcp endpoint. Exploitation also depends on access to a valid UFO_MCP_API_KEY or an equivalent authenticated request context.
Exploit preconditions
- Attack surface: A localhost HTTP MCP endpoint exposed to browser-originated
requests
- Required access: Ability to load attacker-controlled web content in the
victim's browser and obtain or leverage a valid UFO_MCP_API_KEY
- Trigger point: Requests to /mcp, including tool discovery and command
execution operations
- Why exploitation is possible: The server accepts requests without
sufficiently validating host and browser-origin metadata, allowing DNS
rebinding to bridge an external web page to the local service
Why this happens
The underlying bug is inadequate origin and host validation for a local HTTP service. A server that relies only on binding to localhost may still receive requests generated by a browser under DNS-rebinding conditions. Failing to verify the intended Host, Origin, and fetch-site context maps to CWE-346, Origin Validation Error. Exposing tool schemas and privileged operations through that boundary can also contribute to CWE-200, Exposure of Sensitive Information.
Potential impact
- An attacker may enumerate available MCP tool schemas
- An attacker could read files accessible to the victim's user account
- An attacker could execute permitted operating system commands
- Sensitive local information may be disclosed
- The victim's local development or automation environment may be compromised
General mitigation guidance
Mitigation generally focuses on enforcing a strict trust boundary around local HTTP automation services. Secure-by-default designs can validate the expected Host, Origin, and fetch-site metadata, reject unexpected browser contexts, and use an explicit authenticated request model rather than treating localhost as inherently trusted. Access to API keys and command execution should be minimized, scoped to the least privilege, and separated from sensitive filesystem capabilities where practical. Network policy, binding controls, and browser-facing exposure restrictions can further reduce reachability. Tool schemas and sensitive operations should not be exposed unless required by the deployment.
How teams detect issues like this
Detection approaches include static analysis and code review for localhost HTTP servers that omit Host, Origin, or Sec-Fetch-Site checks, as well as searches for wildcard or absent origin validation in MCP handlers. Reviewers can inspect whether authentication is required for both tool discovery and execution, whether API keys are broadly available to browser contexts, and whether command tools have excessive privileges. Runtime monitoring can alert on unexpected browser-originated requests, unusual DNS changes, tool enumeration, and command invocations from local service endpoints. Automated security review tools and policy checks can help enforce these patterns in CI.

