Summary
A server-side request forgery (SSRF) issue in pygeoapi's OGC API process execution allows crafted requests to leverage the subscriber object to reach internal HTTP services.
When exposed in a networked environment, an attacker can abuse this behavior to pivot through the pygeoapi server toward internal endpoints that are not directly accessible from the outside.
Affected context
The vulnerability affects pygeoapi deployments that:
- Run versions from 0.23.0 up to (but not including) 0.23.3
- Expose the OGC API Processes endpoint to untrusted or semi-trusted clients
- Allow process execution requests that can influence or instantiate a subscriber object capable of making HTTP requests
In such contexts, the server effectively becomes an HTTP proxy into internal network resources reachable from the pygeoapi host.
Exploit preconditions
- Attack surface: Network-accessible pygeoapi instance exposing the OGC API Processes interface.
- Required access: Ability to send crafted OGC API process execution requests (typically over HTTP/HTTPS, with or without authentication depending on deployment).
- Trigger point: Submission of a process execution payload that causes the subscriber object to issue HTTP requests to attacker-controlled or internal URLs.
- Why exploitation is possible: The subscriber object is capable of making outbound HTTP requests, and the API does not sufficiently restrict or validate target URLs or network locations, enabling abuse as an SSRF primitive.
Why this happens
This issue stems from insufficient control over server-initiated HTTP requests originating from user-influenced configuration or input.
The subscriber object used during process execution can be directed, directly or indirectly, to contact arbitrary URLs, including internal services, without robust allowlisting or network segmentation checks.
Conceptually, this maps to CWE-918: Server-Side Request Forgery (SSRF), where the application acts as an unintentional proxy, allowing external actors to leverage its network position to reach otherwise protected resources.
Potential impact
- Access to internal HTTP-based services and APIs that are not exposed to the internet
- Enumeration of internal network structure through timing, status codes, or response content
- Interaction with metadata services or control planes if reachable from the pygeoapi host
- Use of the server as a pivot point for further attacks, such as authentication bypass on internal-only endpoints
- Potential data exfiltration from internal services that respond over HTTP
General mitigation guidance
Mitigation focuses on restricting how and where server-initiated HTTP requests can be made from process execution flows:
- Constrain the subscriber object to a strict set of allowed endpoints or domains using allowlists.
- Avoid passing user-controlled data directly into URL construction or request routing logic.
- Enforce network-level controls (e.g., firewall rules or egress policies) to prevent the application server from reaching sensitive internal segments or metadata endpoints.
- Apply the principle of least privilege to outbound connectivity, limiting reachable hosts and protocols to what the process functionality genuinely requires.
- Introduce defensive validation that rejects or neutralizes URLs pointing to private IP ranges, loopback addresses, or link-local services where appropriate.
How teams detect issues like this
Useful detection strategies include:
- Static analysis rules that flag code paths where user-influenced parameters are used to build URLs or configure HTTP clients, particularly around the subscriber object or process execution components.
- Manual code reviews focusing on outbound HTTP request logic, verifying that all destinations are constrained and not derived from untrusted input.
- Runtime monitoring of outbound HTTP traffic from pygeoapi servers, looking for unusual destinations (e.g., internal IP ranges, cloud metadata services, or unexpected ports).
- Integration of application-level policies or middleware that logs and optionally blocks outbound requests to non-approved hosts.

