Summary
MegaParse exposes an unauthenticated URL-fetching endpoint that retrieves caller-supplied addresses from the server. An attacker may use it to access internal services, cloud metadata endpoints, or other restricted resources and receive their responses through the API.
Affected context
The vulnerability occurs in MegaParse deployments that expose the POST /v1/url endpoint and allow requests without authentication. It becomes risky when the server can reach internal network services, cloud instance metadata endpoints, or other resources that are inaccessible to external clients, and when fetched responses are returned to the caller.
Exploit preconditions
- Attack surface: The POST /v1/url HTTP endpoint - Required access: Network access to the endpoint; authentication is not
required according to the reported behavior
- Trigger point: Server-side processing of a caller-supplied URL - Why exploitation is possible: The application makes outbound requests
using attacker-controlled destinations and exposes the resulting response
Why this happens
The underlying bug is unrestricted server-side retrieval of user-controlled URLs. This behavior maps to CWE-918, Server-Side Request Forgery, because the server acts as a network client on behalf of an untrusted caller without sufficiently constraining destinations, protocols, or reachable network zones. Returning the fetched content further turns the server into a proxy for reading resources that may not be directly accessible.
Potential impact
- An attacker may read cloud instance metadata or temporary credentials.
- An attacker could access internal administrative services.
- Sensitive application or infrastructure responses may be disclosed.
- Internal network topology and service information may be exposed.
- The vulnerability can enable follow-on attacks against reachable services.
General mitigation guidance
Mitigation generally focuses on reducing trust in caller-supplied destinations and separating outbound fetching from sensitive network zones. Common defensive patterns include enforcing an allowlist of approved schemes, hosts, and destinations; resolving names and validating final addresses against private, loopback, link-local, and other restricted ranges; limiting redirects; applying outbound egress controls; and avoiding the return of sensitive upstream responses. Authentication and authorization can reduce exposure, while dedicated low-privilege fetch workers, restricted network identities, short timeouts, and response-size limits can reduce impact.
How teams detect issues like this
Detection approaches include static analysis for HTTP clients that consume request-derived URLs, code review checks for unrestricted URL fetching, and tests covering private, loopback, link-local, redirect, and alternate-address destinations. Runtime monitoring can correlate endpoint requests with unusual outbound DNS, connection, and response patterns. Network policy can alert on application workloads contacting metadata services or unexpected internal ranges, and automated security review tools may help identify missing destination validation.

