Summary
Gotenberg 8.29.1 allows an unauthenticated attacker to trigger outbound HTTP POST requests to arbitrary internal or external URLs by abusing the Gotenberg-Webhook-Url header.
Because the default webhook URL filter accepts any destination when both allow-list and deny-list are empty, this can be used as a blind SSRF primitive to probe internal services and cloud metadata endpoints via Gotenberg's network position.
Affected context
The vulnerability occurs in Gotenberg's webhook feature, which is designed to POST converted documents to a user-specified callback URL.
In affected deployments:
- The instance is reachable over the network (e.g., exposed in a service mesh, internal API gateway, or directly on the internet).
- Webhook filtering is left in its default state where both the allow-list and deny-list are empty.
- The
Gotenberg-Webhook-Urlheader is accepted as user input and used to build the outbound HTTP request.
Under these conditions, Gotenberg effectively becomes a generic HTTP client capable of talking to arbitrary URLs from its own network environment.
Exploit preconditions
- Attack surface: HTTP API exposed by Gotenberg, specifically endpoints that support webhooks and honor the
Gotenberg-Webhook-Urlrequest header. - Required access: Unauthenticated network access to the Gotenberg service (from the internet or an internal network, depending on deployment).
- Trigger point: Submitting a document conversion request that includes a crafted
Gotenberg-Webhook-Urlheader pointing to an attacker-chosen URL. - Why exploitation is possible:
- The
FilterDeadlinefunction is responsible for validating outbound webhook destinations against allow/deny lists. - When both allow-list and deny-list configurations are empty (the default), this function returns
nilunconditionally and does not constrain the URL. - The server then issues an HTTP POST with the converted document to the attacker-controlled URL without further network-level restrictions.
- The response body is never returned to the attacker, but the success or failure of the request influences application behavior, enabling blind probing.
Why this happens
This issue is rooted in CWE-918: Server-Side Request Forgery, where server-side HTTP clients are driven by untrusted user input without adequate validation.
Conceptually:
- The application exposes a feature (webhooks) where users supply callback URLs via headers.
- The URL validation function,
FilterDeadline, is designed to enforce configurable allow-lists and deny-lists. - However, the default configuration leaves both lists empty, and the implementation treats this as "no restrictions" rather than "deny by default".
- As a result, arbitrary URLs—even those pointing to internal networks, link-local addresses, or metadata services—are treated as valid targets.
The insecure pattern is trusting user-supplied URLs for server-side HTTP requests without a secure default posture or robust validation of destination hosts and address ranges.
Potential impact
- An attacker may use Gotenberg to send POST requests to internal HTTP services that are not directly reachable from the attacker's network.
- An attacker may probe internal infrastructure (e.g., IP ranges, service endpoints) by observing whether callbacks succeed or trigger error handling, enabling network mapping.
- An attacker may target internal services that perform state-changing operations (e.g., REST APIs, admin panels), potentially causing side effects if endpoints accept the crafted POST.
- An attacker may attempt to reach cloud instance metadata endpoints, which can expose sensitive instance or credential metadata if not otherwise protected.
- The retry logic may amplify traffic to a given internal endpoint, increasing the impact of each crafted request sequence.
General mitigation guidance
Effective mitigation focuses on enforcing strict control over server-initiated HTTP calls and adopting a deny-by-default posture for outbound webhooks.
Recommended defensive patterns include:
- Constrain outbound destinations:
- Use explicit allow-lists of known, trusted webhook hosts or domains where callbacks are permitted.
- When allow-lists are not viable, maintain deny-lists that at least cover RFC1918, link-local, loopback, and metadata address ranges.
- Prefer host and IP validation instead of relying solely on URL string checks, and re-resolve DNS at request time to mitigate DNS-based bypasses.
- Secure defaults:
- Treat "no configuration" as "deny all" rather than "permit all" for outbound network filters.
- Require an explicit configuration step before enabling webhook-based callbacks in production environments.
- Reduce privilege of the HTTP client:
- Run Gotenberg in a network segment that has minimal access to sensitive internal services.
- Apply egress firewall rules or service mesh policies restricting outbound traffic from the Gotenberg pods/containers to the minimum necessary destinations.
- Harden webhook semantics:
- Retain only the minimal information necessary in webhook requests and avoid including sensitive headers or tokens derived from server-side configuration.
- Where possible, use asynchronous job IDs or messages rather than sending full document payloads to arbitrary callers.
How teams detect issues like this
Detection strategies should aim to identify both vulnerable configurations and suspicious use of the webhook mechanism:
- Configuration and code analysis:
- Review configuration management (environment variables, Helm charts, deployment manifests) for webhook allow/deny lists; flag deployments where both are empty while webhooks are enabled.
- Static analysis or manual code review can verify that outbound HTTP client usage is always guarded by restrictive filtering logic and that default paths are not permissive.
- Network monitoring and logging:
- Enable detailed logs for outbound HTTP requests made by Gotenberg, including destination host, path, and status codes (excluding sensitive payloads).
- Use network monitoring or service mesh telemetry to detect unusual outbound traffic patterns, such as requests to private IP ranges or metadata endpoints originating from Gotenberg.
- Policy enforcement:
- Apply egress firewall rules or cloud security group policies that prevent workloads like Gotenberg from contacting internal-only management planes or metadata services.
- Incorporate SSRF-focused checks into CI/CD (for example, policies that disallow user-controlled URLs being used as direct HTTP client targets without allow-listing).

