Summary
Ech0's unauthenticated link preview API performs server-side HTTP(S) requests to attacker-specified URLs, enabling server-side request forgery (SSRF).
An attacker who can reach the Ech0 instance can coerce it into connecting to arbitrary internal or external endpoints from the server's own network position, potentially exposing internal services or aiding further compromise.
Affected context
The vulnerability exists in Ech0 deployments that expose the /api/website/title endpoint and use it for link preview functionality.
This route is unauthenticated and accepts arbitrary URLs supplied by clients, then issues outbound HTTP/HTTPS requests from the server to retrieve page titles.
In affected versions, the implementation lacks host validation, SSRF protections, or certificate verification, allowing external users to influence where the server connects inside its own network environment (e.g., Docker bridge, VPC, localhost).
Exploit preconditions
- Attack surface: The
/api/website/titleHTTP endpoint on the Ech0 server. - Required access: Ability to send HTTP requests to the Ech0 instance (no authentication required for this route).
- Trigger point: Supplying a crafted URL in a request to the link preview endpoint, causing the server to perform a backend HTTP/HTTPS request.
- Why exploitation is possible:
- The endpoint accepts fully attacker-controlled URLs without validation or allowlisting.
- The HTTP client is configured with
InsecureSkipVerify: true, weakening TLS protections. - There is no SSRF filter or network segmentation awareness in the request logic.
- The handler reads the full response body into memory, amplifying impact for large responses (e.g., potential memory pressure).
Why this happens
This issue stems from implementing server-initiated HTTP requests based on untrusted user input without enforcing network or protocol boundaries.
The /api/website/title route is designed to fetch page titles but directly passes user-supplied URLs to the HTTP client, which:
- Performs requests to any host reachable from the server, including internal or loopback addresses.
- Skips TLS certificate verification (
InsecureSkipVerify), trusting any presented certificate.
Conceptually, this aligns with CWE-918: Server-Side Request Forgery (SSRF), where server-side network capabilities are exposed to attackers by proxying arbitrary requests.
The design conflates "user convenience" for link previews with a powerful, unguarded network primitive, creating an unintended gateway to internal services.
Potential impact
- Discovery and probing of internal HTTP(S) services not directly exposed to the internet.
- Access to sensitive metadata endpoints (e.g., cloud instance metadata services) that may reveal credentials or configuration data.
- Interaction with administrative or debug interfaces bound only to localhost or private network ranges.
- Use of the Ech0 server as a pivot point for lateral movement within the hosting environment.
- Increased memory usage or potential resource exhaustion if very large responses are fetched repeatedly.
General mitigation guidance
Effective mitigation focuses on constraining where the server can connect and reducing trust in user-supplied URLs:
- Introduce strict allowlists or well-defined URL patterns that limit outbound requests to known, external domains used for content preview.
- Implement robust SSRF filtering, blocking connections to internal IP ranges (e.g., RFC1918, link-local, loopback, metadata addresses) and non-HTTP schemes.
- Enforce proper TLS verification by disabling
InsecureSkipVerifyand validating certificates and hostnames. - Apply time, body-size, and redirect limits on outbound requests to minimize resource consumption and abuse.
- Consider mediated fetching (e.g., using a dedicated sandboxed microservice or third-party preview service) instead of giving the main application direct network reachability.
- Restrict network egress for the Ech0 application at the infrastructure level (firewall rules, container network policies) to a minimal set of allowed destinations.
How teams detect issues like this
Organizations can detect and monitor this class of issue using a combination of code-level and operational signals:
- Static analysis and code review:
- Flag endpoints that accept user-controlled URLs and perform server-side HTTP(S) requests.
- Look for HTTP client configurations that disable TLS verification or omit host checks.
- Identify handlers that do not validate destination hosts or IP ranges before making outbound requests.
- Security testing and scanning:
- Use dynamic application security testing (DAST) tools to probe for SSRF via URL-taking endpoints.
- Conduct manual penetration tests focusing on "URL fetch" or "preview" features to see if internal addresses are reachable.
- Operational monitoring:
- Log outbound HTTP requests with destination IPs/hosts and correlate with incoming request parameters.
- Alert on unusual outbound traffic patterns, such as requests to internal ranges or metadata endpoints.
- Policy enforcement:
- Enforce coding standards prohibiting
InsecureSkipVerifyand mandating allowlists for server-side URL fetching. - Integrate these checks into CI pipelines and code-review templates using automated linters or security scanners.

