Summary
A server-side request forgery (SSRF) flaw in 9Router's /v1/web/fetch endpoint allows an attacker-provided URL to be requested by external scraping providers without proper network-level restrictions.
When an authenticated or locally-connected user can control this URL, the server may be tricked into contacting internal services or cloud metadata endpoints and returning sensitive response data, making deployments with reachable private networks particularly exposed.
A server-side request forgery (SSRF) flaw in 9Router's /v1/web/fetch endpoint allows an attacker-provided URL to be requested by external scraping providers without proper network-level restrictions.
When an authenticated or locally-connected user can control this URL, the server may be tricked into contacting internal services or cloud metadata endpoints and returning sensitive response data, making deployments with reachable private networks particularly exposed.
Affected context
This vulnerability manifests in deployments of 9Router (before 0.4.72) that expose the /v1/web/fetch endpoint to authenticated users or local clients.
The endpoint forwards a user-supplied url parameter to configured external scraping providers (Firecrawl, Jina Reader, Tavily, or Exa) and performs only syntactic validation via new URL().
Environments where the 9Router instance has network reachability to cloud metadata services, internal HTTP endpoints, or localhost-only admin APIs are most at risk, as the server can act as a proxy into networks that the user cannot access directly.
This vulnerability manifests in deployments of 9Router (before 0.4.72) that expose the /v1/web/fetch endpoint to authenticated users or local clients.
The endpoint forwards a user-supplied url parameter to configured external scraping providers (Firecrawl, Jina Reader, Tavily, or Exa) and performs only syntactic validation via new URL().
Environments where the 9Router instance has network reachability to cloud metadata services, internal HTTP endpoints, or localhost-only admin APIs are most at risk, as the server can act as a proxy into networks that the user cannot access directly.
Exploit preconditions
- Attack surface: HTTP requests targeting the
/v1/web/fetchendpoint on the 9Router service. - Required access: Ability to send authenticated or locally-connected requests with arbitrary
urlvalues; no special permissions beyond endpoint access. - Trigger point: Supplying a crafted URL parameter that points to internal hosts, private IPs, or cloud metadata addresses, which the server then forwards to the scraping provider.
- Why exploitation is possible: The implementation validates URLs only for syntactic correctness (e.g., via
new URL()), and does not enforce allowlists or blocklists for sensitive address ranges, enabling the server to reach internal network locations and return their HTTP responses to the attacker.
- Attack surface: HTTP requests targeting the
/v1/web/fetchendpoint on the 9Router service. - Required access: Ability to send authenticated or locally-connected requests with arbitrary
urlvalues; no special permissions beyond endpoint access. - Trigger point: Supplying a crafted URL parameter that points to internal hosts, private IPs, or cloud metadata addresses, which the server then forwards to the scraping provider.
- Why exploitation is possible: The implementation validates URLs only for syntactic correctness (e.g., via
new URL()), and does not enforce allowlists or blocklists for sensitive address ranges, enabling the server to reach internal network locations and return their HTTP responses to the attacker.
Why this happens
The underlying issue aligns with CWE-918: Server-Side Request Forgery (SSRF), where a server-side component performs outbound requests based on user-controlled input without adequate constraints.
In 9Router's /v1/web/fetch endpoint, the url parameter is trusted after minimal syntactic validation and forwarded to scraping providers, effectively turning the service into a programmable HTTP client.
The absence of network-level restrictions (such as disallowing private address ranges, cloud metadata endpoints, and internal hostnames) and a lack of context-aware validation allow an attacker to coerce the server into making unintended internal requests and relay sensitive data back to the attacker.
The underlying issue aligns with CWE-918: Server-Side Request Forgery (SSRF), where a server-side component performs outbound requests based on user-controlled input without adequate constraints.
In 9Router's /v1/web/fetch endpoint, the url parameter is trusted after minimal syntactic validation and forwarded to scraping providers, effectively turning the service into a programmable HTTP client.
The absence of network-level restrictions (such as disallowing private address ranges, cloud metadata endpoints, and internal hostnames) and a lack of context-aware validation allow an attacker to coerce the server into making unintended internal requests and relay sensitive data back to the attacker.
Potential impact
- An attacker can read cloud instance metadata pages, which may expose credentials or access tokens.
- Internal HTTP services that are not directly exposed to the internet may be queried and their responses returned.
- Localhost-only admin panels or debug endpoints can be reached through the server, bypassing authentication based on network assumptions.
- Sensitive configuration files or diagnostics served via internal web interfaces may be disclosed.
- SSRF can serve as a pivot point for further compromise, such as abusing discovered credentials or misconfigurations.
- An attacker can read cloud instance metadata pages, which may expose credentials or access tokens.
- Internal HTTP services that are not directly exposed to the internet may be queried and their responses returned.
- Localhost-only admin panels or debug endpoints can be reached through the server, bypassing authentication based on network assumptions.
- Sensitive configuration files or diagnostics served via internal web interfaces may be disclosed.
- SSRF can serve as a pivot point for further compromise, such as abusing discovered credentials or misconfigurations.
General mitigation guidance
Effective mitigation typically centers on strictly constraining outbound requests derived from user input and reducing the trust placed in user-controlled URLs.
Common defensive patterns include:
- Implementing an explicit allowlist of permitted domains or hostnames for the
urlparameter, and rejecting any requests outside that set. - Enforcing robust network-level filtering to block private IP ranges, link-local addresses, loopback addresses, and known cloud metadata endpoints.
- Performing DNS resolution and IP classification on requested hosts before dispatching any outbound call, with rules that prevent access to internal or untrusted network segments.
- Decoupling user-facing URL inputs from direct server-side fetching, for example by mediating through controlled, hardened proxy components.
- Applying least-privilege networking for the service, limiting which internal networks and services it can reach, so that even misrouted requests have reduced impact.
Effective mitigation typically centers on strictly constraining outbound requests derived from user input and reducing the trust placed in user-controlled URLs.
Common defensive patterns include:
- Implementing an explicit allowlist of permitted domains or hostnames for the
urlparameter, and rejecting any requests outside that set. - Enforcing robust network-level filtering to block private IP ranges, link-local addresses, loopback addresses, and known cloud metadata endpoints.
- Performing DNS resolution and IP classification on requested hosts before dispatching any outbound call, with rules that prevent access to internal or untrusted network segments.
- Decoupling user-facing URL inputs from direct server-side fetching, for example by mediating through controlled, hardened proxy components.
- Applying least-privilege networking for the service, limiting which internal networks and services it can reach, so that even misrouted requests have reduced impact.
How teams detect issues like this
Detection strategies for SSRF in similar endpoints typically focus on both code-level and operational patterns:
- Static analysis or linting rules that flag functions or modules making outbound HTTP requests based on user input, especially where only syntactic validation (e.g.,
new URL()) is present. - Code review practices that treat any feature acting as a proxy or fetcher of arbitrary URLs as a high-risk area, prompting checks for allowlists, IP-range filtering, and hostname restrictions.
- Runtime monitoring of outbound HTTP traffic from the service, looking for unusual destinations such as metadata IPs (
169.254.169.254), localhost (127.0.0.1), or RFC1918 private ranges. - Integrating security policies into CI/CD pipelines that enforce safe patterns for URL handling and require security sign-off for new proxy-like endpoints.
Detection strategies for SSRF in similar endpoints typically focus on both code-level and operational patterns:
- Static analysis or linting rules that flag functions or modules making outbound HTTP requests based on user input, especially where only syntactic validation (e.g.,
new URL()) is present. - Code review practices that treat any feature acting as a proxy or fetcher of arbitrary URLs as a high-risk area, prompting checks for allowlists, IP-range filtering, and hostname restrictions.
- Runtime monitoring of outbound HTTP traffic from the service, looking for unusual destinations such as metadata IPs (
169.254.169.254), localhost (127.0.0.1), or RFC1918 private ranges. - Integrating security policies into CI/CD pipelines that enforce safe patterns for URL handling and require security sign-off for new proxy-like endpoints.

