/

CVE-2026-71270

Severity:

HIGH RISK

(8.6)

SSRF (CWE-918) in Stirling-PDF URL Conversion Endpoint

CVE-2026-71270

Deferred

Vulnerability type

Category:

Server-Side Request Forgery

CWE:

CWE-918

Impact:

Internal Resource Access and Information Disclosure

Severity:

HIGH RISK

(8.6)

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

Stirling-PDF's URL-to-PDF conversion endpoint does not apply the SSRF protections used by related conversion endpoints. An attacker-controlled public webpage may cause the server-side WeasyPrint process to request internal services or cloud metadata resources referenced by embedded HTML elements, potentially exposing their contents in the resulting PDF.

Affected context

The issue occurs in deployments where the URL conversion endpoint fetches remote HTML and passes it to WeasyPrint for PDF generation. Although the initially requested URL is checked for public reachability, embedded resources in the fetched document may be retrieved separately without equivalent SSRF filtering. Risk depends on the server's network access, cloud environment, and the privileges available to the conversion process.

Exploit preconditions

  • Attack surface: The URL-to-PDF conversion API endpoint
  • Required access: Ability to submit a URL for conversion, subject to the application's normal access controls
  • Trigger point: Server-side retrieval of HTML followed by resource loading during PDF rendering
  • Why exploitation is possible: Validation applies to the initial URL but not to every resource referenced by the returned HTML, allowing the rendering subprocess to access internal or otherwise restricted destinations

Why this happens

The vulnerability results from incomplete SSRF enforcement across a multi-stage fetch pipeline. The application validates the destination of the initial request but treats resource references in the retrieved HTML as trusted input. WeasyPrint then performs additional network requests without applying the same destination checks, which maps to CWE-918: Server-Side Request Forgery.

Potential impact

  • Internal network services may be accessed from the server's network position
  • Cloud instance metadata or temporary credentials could be exposed
  • Sensitive internal responses may be embedded in generated PDF files
  • Network topology and service information could be disclosed
  • Compromised credentials may enable further unauthorized activity

General mitigation guidance

Mitigation generally focuses on enforcing SSRF protections at every outbound-request stage, including requests initiated by document renderers.

Common defensive patterns include:

  • Applying centralized allowlisting and destination validation to the initial URL and all embedded resources
  • Disabling or restricting external resource loading during PDF rendering by default
  • Blocking loopback, link-local, private, reserved, and otherwise restricted address ranges after DNS resolution
  • Revalidating destinations across redirects and preventing DNS rebinding
  • Running rendering workers with isolated network access and least-privilege permissions
  • Reducing the trust placed in remote HTML and using sanitized, constrained document inputs
  • Preventing generated documents or error responses from exposing sensitive fetched content

How teams detect issues like this

Detection can combine application, network, and source-level controls:

  • Use static analysis to identify URL fetches and renderer configurations that lack shared SSRF validation
  • Review code paths where HTML, CSS, images, fonts, or other document resources trigger outbound requests
  • Inspect logs for conversion requests followed by connections to private, loopback, link-local, or metadata address ranges
  • Monitor rendering workers for unexpected internal DNS lookups and outbound traffic
  • Enforce policies requiring centralized egress controls and destination validation for document-processing services
  • Use automated security review tools to flag inconsistent protections between sibling endpoints

Sources

SourceLink
github.comgithub.com/Stirling-Tools/Stirling-PDF

Frequently asked

questions

It may be remotely exploitable when an attacker can access the URL conversion endpoint and the server can reach internal or cloud-resident resources. The practical scope depends on authentication, network segmentation, and endpoint exposure.

Not necessarily. The server-side conversion process performs the outbound requests, so the key requirement is the ability to submit a conversion request and influence the fetched document or its resource references.

Apply SSRF validation to every outbound request made during conversion, including requests performed by the rendering engine, while preferably disabling external resource loading by default.

Use centralized egress policy, strict destination allowlists, redirect and DNS-rebinding defenses, isolated rendering workers, and security tests that cover nested document resources rather than only the initial URL.

Find out what's already
exploitable in your codebase.