/

CVE-2026-27018

Severity:

HIGH RISK

(7.5)

SSRF in Gotenberg Document Conversion API

CVE-2026-27018

Analyzed

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-22, CWE-918

Impact:

Server-Side Request Forgery with Potential Internal Network Access

Severity:

HIGH RISK

(7.5)

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

Gotenberg, an API for converting document formats, contains a server-side request forgery (SSRF) issue where URL scheme validation can be bypassed by using mixed-case or uppercase schemes.

When user-controlled URLs are only validated in a case-sensitive manner, attackers may coerce the service into making unintended network requests to internal or otherwise restricted endpoints.

Affected context

This vulnerability occurs in Gotenberg deployments where the service accepts user-supplied URLs as input for document retrieval or conversion.

It specifically affects logic that attempts to restrict or filter URL schemes (e.g., allowing only http/https) but performs checks in a case-sensitive way.

Under these conditions, an attacker can craft URLs with mixed-case or uppercase schemes (e.g., HtTp:// or FILE://) to bypass the intended restrictions and cause the server to initiate unintended outbound requests.

Exploit preconditions

  • Attack surface: Public or internal HTTP(S) endpoints that expose Gotenberg's document conversion API and accept user-controlled URLs.
  • Required access: Ability to submit or influence input containing a URL (e.g., request parameters, JSON payloads, or form fields used by Gotenberg to fetch documents).
  • Trigger point: URL handling and scheme validation logic that relies on case-sensitive comparisons to enforce allowed or disallowed schemes.
  • Why exploitation is possible: The URL scheme comparison does not normalize case, allowing disallowed or sensitive schemes to be represented in mixed- or upper-case forms that bypass the existing filters.

Why this happens

The root cause lies in insufficient input normalization and validation of URL schemes before they are used by the server to initiate outbound network requests.

The prior fix for a related issue enforced scheme restrictions but implicitly assumed a consistent lowercase representation, leading to a case-sensitivity bypass.

This maps to CWE-918 (Server-Side Request Forgery), where an application can be tricked into making arbitrary network requests, and CWE-22 (Improper Limitation of a Pathname to a Restricted Directory) when non-HTTP schemes like file or similar handlers could be abused to access unintended local or internal resources.

Conceptually, the insecure pattern is: accepting user-controlled URLs, applying incomplete or case-sensitive scheme checks, and then using those URLs as-is in privileged server-side network calls.

Potential impact

  • The service may perform HTTP(S) requests to internal network resources not directly accessible from the outside (intranet sites, internal APIs, cloud metadata endpoints).
  • Internal services that trust traffic originating from Gotenberg's host or network segment can be probed or interacted with by an attacker.
  • Sensitive information exposed by internal endpoints (configuration data, credentials, metadata) may be exfiltrated via the server's response.
  • Depending on the environment, attackers could pivot deeper into the infrastructure, chaining SSRF with other weaknesses (e.g., misconfigured metadata services).
  • If non-web schemes are mishandled, the process may gain access to unintended local or file-like resources.

General mitigation guidance

Effective mitigation centers on robust URL validation, normalization, and strict control of where the server is allowed to connect.

Recommended defensive patterns include:

  • Normalize URL schemes (e.g., converting to lowercase) before any validation, and apply allowlist-based checks on acceptable schemes (such as http and https only).
  • Enforce strict host and network allowlists, ensuring the service only connects to known-safe destinations (e.g., specific domains or IP ranges) rather than arbitrary user-provided hosts.
  • Deny access to private or sensitive IP ranges (loopback, link-local, RFC1918, and cloud provider metadata IPs) even if the scheme appears valid.
  • Treat user-provided URLs as untrusted input: perform parsing using hardened libraries, reject malformed or ambiguous URLs, and avoid automatic following of redirects to unknown hosts.
  • Apply defense-in-depth at the infrastructure level, such as outbound firewall rules or egress policies that constrain where Gotenberg instances can connect.

How teams detect issues like this

Detection approaches can combine code-level analysis with runtime monitoring:

  • Static analysis and code review: Search for URL handling paths where:
  • User-provided URLs are passed to HTTP clients or file access APIs.
  • Scheme checks rely on direct string comparisons without prior normalization.
  • No explicit host or network allowlists are in place.
  • Policy enforcement: Implement coding guidelines or lint rules that require:
  • Lowercasing of URL schemes prior to comparison.
  • Use of central, audited helper functions for URL validation and outbound requests.
  • Runtime monitoring:
  • Log and audit outbound requests from Gotenberg, focusing on unusual destinations (internal IP ranges, metadata services, or unexpected domains).
  • Use network-level monitoring or egress filtering to detect and block suspicious SSRF-like patterns.
  • Automated security scanning tools, including SAST and DAST, can be configured to look for SSRF patterns and to fuzz URL inputs with variant casing to validate that protections are effective.

Sources

SourceLink
github.comgithub.com/gotenberg/gotenberg/commit/06b2b2e10c52b58135edbfe82e94d599eb0c5a11
github.comgithub.com/gotenberg/gotenberg/commit/8625a4e899eb75e6fcf46d28394334c7fd79fff5
github.comgithub.com/gotenberg/gotenberg/releases/tag/v8.29.0
github.comgithub.com/gotenberg/gotenberg/security/advisories/GHSA-jjwv-57xh-xr6r

Frequently asked

questions

Yes, if the Gotenberg API is exposed to untrusted clients and accepts user-controlled URLs, an attacker can exploit this vulnerability remotely by crafting URLs with mixed-case or uppercase schemes.

The attacker must be able to submit requests to the affected Gotenberg endpoint that include or influence the URL used for document retrieval or conversion. No direct access to internal networks is required; the vulnerability abuses Gotenberg's own network access.

Normalize and strictly validate URL schemes and destinations before use, apply allowlist-based restrictions on both schemes and hosts, and centralize outbound request logic so that all such calls pass through well-reviewed validation and policy checks.

Adopt secure coding practices for URL handling that include normalization, allowlists, and network segmentation; incorporate SSRF-focused checks into code review and automated testing; and enforce egress controls so that application servers cannot freely reach arbitrary internal or external endpoints.

Find out what's already
exploitable in your codebase.