/

CVE-2026-42591

Severity:

HIGH RISK

(8.2)

Server-Side Request Forgery (SSRF) in Gotenberg PDF API

CVE-2026-42591

Analyzed

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918

Impact:

Network Pivoting / Internal Service Access via SSRF

Severity:

HIGH RISK

(8.2)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A server-side request forgery (SSRF) issue in Gotenberg's LibreOffice conversion endpoint allows uploaded documents to trigger outbound HTTP requests from the server when processed by LibreOffice.

Because embedded external URLs inside documents are fetched by LibreOffice without prior inspection by Gotenberg, an attacker can potentially reach internal services or restricted network resources accessible from the Gotenberg instance.

Affected context

This vulnerability affects Gotenberg deployments that expose the /forms/libreoffice/convert endpoint and use LibreOffice for document-to-PDF conversion.

It becomes relevant when:

  • Users can upload arbitrary office documents to be converted.
  • The Gotenberg service has network connectivity to internal or otherwise non-public resources.
  • There is reliance on Gotenberg's SSRF filters to restrict where the service can make outbound HTTP requests.

Exploit preconditions

  • Attack surface: HTTP(S) requests to the /forms/libreoffice/convert endpoint.
  • Required access: Ability to submit or upload documents for LibreOffice conversion (typically as an authenticated or anonymous API client, depending on deployment).
  • Trigger point: LibreOffice processing a document that contains embedded external URLs (e.g., linked images, OLE objects, or other external references).
  • Why exploitation is possible: Gotenberg passes uploaded files directly to LibreOffice without sanitizing or validating embedded URLs, and LibreOffice independently issues outbound network requests to fetch those URLs, circumventing Gotenberg's SSRF filters.

Why this happens

The root cause is a mismatch between where SSRF protections are enforced and where outbound requests are actually generated.

Gotenberg's SSRF filters are applied at the API layer, but the LibreOffice conversion component is allowed to process untrusted documents containing embedded external resources.

When LibreOffice resolves these external URLs, it performs network requests using its own logic, which is not governed by the SSRF filters.

This maps to CWE-918: Server-Side Request Forgery (SSRF), where a server component initiates network requests to attacker-controlled destinations due to unvalidated user input and incomplete mediation between security controls and underlying libraries.

Potential impact

  • Discovery and interaction with internal HTTP services that are not directly exposed to the internet.
  • Access to metadata or configuration endpoints (e.g., cloud instance metadata services) reachable from the Gotenberg host.
  • Use of the Gotenberg server as a pivot point for further internal reconnaissance.
  • Potential exposure of sensitive information returned by internal services (depending on how responses are handled and logged).
  • Contribution to a broader attack chain, such as exploiting vulnerabilities on internal services reachable from the Gotenberg environment.

General mitigation guidance

Mitigation generally focuses on constraining outbound network behavior and validating document content before handing it off to LibreOffice.

Pattern-based approaches include:

  • Enforcing network egress controls at the infrastructure level (e.g., firewalls, egress proxies) to restrict where the Gotenberg container or host can make HTTP/HTTPS requests.
  • Running conversion components in isolated network segments or sandboxes with no access to sensitive internal services or metadata endpoints.
  • Sanitizing or filtering uploaded documents to strip or rewrite external resource references before conversion, where feasible.
  • Applying strict allowlists for permissible outbound domains or IP ranges for conversion-related traffic.
  • Adopting a least-privilege configuration for the Gotenberg service and its runtime environment, minimizing accessible network surfaces.

How teams detect issues like this

Detection can rely on both application-level and infrastructure-level signals:

  • Monitoring outbound HTTP/HTTPS traffic originating from Gotenberg or its container for unusual destinations or patterns (e.g., internal IP ranges, metadata endpoints).
  • Reviewing network logs and firewall events to identify requests triggered during document conversions to unexpected hosts.
  • Using static analysis or configuration review to identify components that process untrusted files and can make network calls outside the primary application's control path.
  • Incorporating SSRF-focused security tests into CI/CD pipelines, including tests that verify third-party tools (like LibreOffice) cannot reach arbitrary URLs when handling user-supplied content.

Sources

SourceLink
github.comgithub.com/gotenberg/gotenberg/security/advisories/GHSA-rm4c-xj6x-49mw

Frequently asked

questions

Yes. If the /forms/libreoffice/convert endpoint is reachable over the network and accepts user uploads, an attacker can remotely submit crafted documents that cause the server to perform SSRF requests.

The attacker needs the ability to upload or submit documents to the LibreOffice conversion endpoint. Whether this requires authentication depends on how the Gotenberg instance is deployed and protected.

The most robust pattern is a combination of strict outbound network controls (e.g., blocking access to internal networks and sensitive metadata services) and ensuring that document-processing components cannot initiate unrestricted HTTP(S) requests to attacker-controlled destinations.

When integrating third-party tools that process untrusted input, treat them as separate network-active components: enforce egress restrictions, sandbox them, and avoid assuming that top-level SSRF filters cover all internal libraries or subprocesses that might perform network I/O.

Find out what's already
exploitable in your codebase.