Summary
mcp-webresearch 0.1.7 exposes a server-side request forgery flaw in its visit_page tool, allowing crafted URLs to direct the server-controlled browser to internal network resources.
By combining prompt injection with unfiltered private or metadata IP ranges, an attacker can trick the LLM into fetching internal endpoints and leaking sensitive content such as cloud credentials back into the model context.
Affected context
The vulnerability arises in environments where mcp-webresearch 0.1.7 is deployed with the visit_page tool connected to an LLM that can be steered by user prompts.
The tool validates only the URL protocol (e.g., HTTP/HTTPS) but does not restrict requests to public IP space, allowing loopback, link-local, and cloud metadata addresses.
When the underlying Playwright-driven browser runs on a host with access to internal networks or metadata services, the server can inadvertently act as a proxy to otherwise non-internet-accessible endpoints.
Exploit preconditions
- Attack surface: The LLM tool interface that exposes visit_page, typically via chat or automation flows.
- Required access: Ability to issue prompts or instructions to the LLM that result in invoking visit_page, including the ability to perform prompt injection against the model.
- Trigger point: The LLM constructs or accepts a URL parameter pointing to loopback, link-local, or cloud metadata IP ranges, which visit_page then opens through Playwright.
- Why exploitation is possible: The URL validation logic only checks the scheme and does not filter private, reserved, or metadata address ranges, allowing external users to coerce the server into reaching internal network services and returning their responses into the model output.
Why this happens
This vulnerability stems from treating LLM-generated or user-influenced URLs as trustworthy and only validating the protocol component rather than the full destination address space.
The visit_page tool lacks network-level egress restrictions or application-level checks to block access to private, loopback, link-local, or metadata address ranges.
As a result, the server-side automation layer (Playwright browser) becomes a generic HTTP client that can be driven by untrusted input to reach internal services, matching the pattern in CWE-918 where server-side components make unintended requests on behalf of an attacker.
Potential impact
- Access to cloud instance metadata services that could reveal temporary credentials, tokens, or configuration secrets.
- Discovery and enumeration of internal HTTP services, admin panels, or debug endpoints not exposed to the public internet.
- Exfiltration of sensitive internal web content (e.g., dashboards, internal APIs) into the LLM context and downstream logs.
- Use of internal access to pivot into further attacks, such as service misconfiguration exploitation or credential reuse.
General mitigation guidance
Mitigation patterns center on constraining where server-side HTTP clients may connect and minimizing trust in LLM-supplied URLs.
Common approaches include:
- Implementing strict allowlists of domains or IP ranges that visit_page is permitted to access, rejecting any others by default.
- Explicitly blocking loopback, link-local, RFC1918 private networks, and well-known cloud metadata IP ranges at the application logic layer.
- Applying network-level egress controls (e.g., firewall rules, cloud security groups) to prevent the host from reaching internal segments that are not required for normal operation.
- Introducing an explicit separation between user-controllable URLs and internal operations, ensuring LLM tools cannot directly reach internal services.
- Reducing the privileges associated with any credentials or tokens that might be accessible via metadata services, limiting blast radius if a request slips through.
How teams detect issues like this
Detection efforts typically focus on monitoring outbound traffic patterns and reviewing code paths that initiate server-side requests.
Possible strategies include:
- Static or configuration analysis to identify HTTP client usage that accepts arbitrary URLs or does not enforce domain/IP allowlists.
- Code review practices that flag tools or integrations where LLM-controlled parameters feed directly into network requests.
- Network monitoring and logging of outgoing HTTP requests from the mcp-webresearch host, with alerts for connections to loopback, link-local, private address space, or known metadata IPs.
- Use of automated security scanners or SAST tools configured with rules for SSRF-like patterns, especially in components that wrap browsers, HTTP clients, or headless automation.

