GHSA-pc36-qwjq-x68c: SSRF

Published Oct 7, 2026
·
Updated

Summary

When remote fetching is enabled (enableremotefetch=True, together with fetchimages=True or HTML renderpage=True), docling's protection against requests to private and loopback addresses can be bypassed.

- The URL check resolves the host name once, to a single IPv4 address. The HTTP request then resolves it again. A name that returns a public A record together with an internal AAAA record, or one that changes its answer between the two lookups (DNS rebinding), reaches internal addresses. - The check and the HTTP request parse the URL differently. With a backslash in the authority, such as http://127.0.0.1:8080\@1.1.1.1/x.png, the check validates 1.1.1.1 while the HTTP client connects to 127.0.0.1:8080. - In HTML browser-rendering mode (renderpage=True), requests made by the page are allowed for any http(s) URL without an IP check.

Details

- validateurlsafety in docling/backend/utils/imageresourceloader.py calls socket.gethostbyname(), which returns one IPv4 address. It checks that address and then passes the original URL string to requests, which parses it again with urllib3 and resolves the name independently through getaddrinfo. urllib.parse treats a backslash in the authority as part of the host section, while urllib3 ends the authority there, so the two can pick different hosts. This loader is shared by the HTML, Markdown, AsciiDoc, OpenDocument and JATS backends. - docling/backend/htmlbackend.py routes browser requests in render mode. When enableremotefetch is set, it continues any http(s) request, including iframes and images, without resolving or checking the destination.

JavaScript is disabled during rendering, so the browser path can only show internal responses passively in the page screenshot. It cannot read them and send them elsewhere.

Affected configurations

- Affected: callers that enable enableremotefetch (CLI: --html-image-fetch remote or all) and process untrusted documents. - Not affected: the default configuration (enableremotefetch=False).

The main-URL fetch for DocumentConverter.convert("https://...") is implemented in docling-core and is tracked there.

Impact

Requests from the converting host to internal services such as cloud metadata endpoints and loopback services. Response content is exposed only when it decodes as an image or is rendered into the page screenshot.

Patches

Fixed in docling 2.132.0 by #4420. The image loader now resolves the host once, requires every resolved address (IPv4 and IPv6, including IPv4-mapped, 6to4 and NAT64 forms) to be globally routable, and connects to one of the validated addresses, using the same parsed host for the check and the connection. Remote requests made during HTML browser rendering are downloaded by the same loader, and the browser itself stays offline. When a proxy is configured through environment variables, requests go through the proxy, which is then responsible for filtering destinations.

Workarounds

Upgrade to 2.132.0. For older versions:

Keep enableremotefetch=False for untrusted documents, or block egress to private, link-local and loopback ranges at the network level.

Affected Software

2 affected componentsFixes available
pip/docling-slim>=2.92.0<2.132.0
2.132.0
pip/docling>=2.91.0<2.132.0
2.132.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/docling-slim to a version that resolves this vulnerability.

    Fixed in 2.132.0
  2. Upgrade

    Upgrade pip/docling to a version that resolves this vulnerability.

    Fixed in 2.132.0
  3. Upgrade

    Upgrade docling to a version that resolves this vulnerability.

    Fixed in 2.132.0
  4. Configuration

    Keep enable_remote_fetch=False when processing untrusted documents.

    Docling enable_remote_fetch = False
  5. Compensating control

    Block egress from the converting host to private, link-local, and loopback IP ranges.

Event History

Oct 7, 2026
Advisory Published
via GitHub·08:42 PM
Data Sourced
via GitHub·08:42 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which deployments are exposed?

Deployments using pip/docling or pip/docling-slim are exposed when remote fetching is enabled and either image fetching is enabled with fetch_images=True or HTML rendering is enabled with render_page=True. The practical risk is highest where untrusted input can cause Docling to retrieve external URLs or render attacker-controlled HTML.

2

What does an attacker need to exploit this issue?

An attacker needs to cause Docling to process a crafted remote URL or HTML content that triggers a request. They can exploit DNS resolution differences, URL parsing differences involving a backslash in the authority, or unrestricted page-initiated HTTP(S) requests during HTML browser rendering.

3

What can be done if patching is not immediately possible?

Disable remote fetching, or avoid enabling fetch_images=True and render_page=True. In particular, disabling render_page=True prevents the browser-rendering mode that permits page requests to arbitrary HTTP(S) URLs without an IP safety check.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203