Docling has SSRF guard bypass in remote resource fetching (DNS rebinding / multi-record resolution; no IP validation in HTML render mode)
What fixes it
- 2.132.0docling, pipGitHub
- 2.132.0docling-slim, pipGitHub
- 2.132.0docling, PyPIOSV
pip install "docling>=2.132.0" - 2.132.0docling-slim, PyPIOSV
pip install "docling-slim>=2.132.0"
A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.
Description
Summary
When remote fetching is enabled (enable_remote_fetch=True, together with fetch_images=True or HTML render_page=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 validates1.1.1.1while the HTTP client connects to127.0.0.1:8080. - In HTML browser-rendering mode (
render_page=True), requests made by the page are allowed for anyhttp(s)URL without an IP check.
Details
validate_url_safetyindocling/backend/utils/image_resource_loader.pycallssocket.gethostbyname(), which returns one IPv4 address. It checks that address and then passes the original URL string torequests, which parses it again with urllib3 and resolves the name independently throughgetaddrinfo.urllib.parsetreats 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/html_backend.pyroutes browser requests in render mode. Whenenable_remote_fetchis set, it continues anyhttp(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
enable_remote_fetch(CLI:--html-image-fetch remoteorall) and process untrusted documents. - Not affected: the default configuration (
enable_remote_fetch=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 enable_remote_fetch=False for untrusted documents, or block egress to private, link-local and loopback ranges at the network level.
Text from GitHub Advisory Database
Affected versions 101
- docling, pip>= 2.91.0, < 2.132.0GitHub
- docling-slim, pip>= 2.92.0, < 2.132.0GitHub
- doclingaffected: >= 2.91.0, < 2.132.0CVE List
- docling-slimaffected: >= 2.91.0, < 2.132.0CVE List
- docling, PyPIfrom 2.91.0, fixed in 2.132.0OSV
- docling, PyPI2.100.0OSV
- docling, PyPI2.101.0OSV
- docling, PyPI2.102.0OSV
- docling, PyPI2.102.1OSV
- docling, PyPI2.102.2OSV
- docling, PyPI2.103.0OSV
- docling, PyPI2.104.0OSV
- docling, PyPI2.105.0OSV
- docling, PyPI2.106.0OSV
- docling, PyPI2.107.0OSV
- docling, PyPI2.108.0OSV
- docling, PyPI2.109.0OSV
- docling, PyPI2.110.0OSV
- docling, PyPI2.111.0OSV
- docling, PyPI2.112.0OSV
- docling, PyPI2.113.0OSV
- docling, PyPI2.114.0OSV
- docling, PyPI2.115.0OSV
- docling, PyPI2.116.0OSV
- docling, PyPI2.117.0OSV
- docling, PyPI2.118.0OSV
- docling, PyPI2.118.1OSV
- docling, PyPI2.119.0OSV
- docling, PyPI2.120.1OSV
- docling, PyPI2.120.2OSV
- docling, PyPI2.120.3OSV
- docling, PyPI2.121.0OSV
- docling, PyPI2.122.0OSV
- docling, PyPI2.123.0OSV
- docling, PyPI2.123.1OSV
- docling, PyPI2.124.0OSV
- docling, PyPI2.125.0OSV
- docling, PyPI2.126.0OSV
- docling, PyPI2.127.0OSV
- docling, PyPI2.128.0OSV
- docling, PyPI2.129.0OSV
- docling, PyPI2.130.0OSV
- docling, PyPI2.131.0OSV
- docling, PyPI2.91.0OSV
- docling, PyPI2.92.0OSV
- docling, PyPI2.93.0OSV
- docling, PyPI2.94.0OSV
- docling, PyPI2.95.0OSV
- docling, PyPI2.96.0OSV
- docling, PyPI2.96.1OSV
- docling, PyPI2.97.0OSV
- docling, PyPI2.98.0OSV
- docling, PyPI2.99.0OSV
- docling-slim, PyPIfrom 2.92.0, fixed in 2.132.0OSV
- docling-slim, PyPI2.100.0OSV
- docling-slim, PyPI2.101.0OSV
- docling-slim, PyPI2.102.0OSV
- docling-slim, PyPI2.102.1OSV
- docling-slim, PyPI2.102.2OSV
- docling-slim, PyPI2.103.0OSV
- docling-slim, PyPI2.104.0OSV
- docling-slim, PyPI2.105.0OSV
- docling-slim, PyPI2.106.0OSV
- docling-slim, PyPI2.107.0OSV
- docling-slim, PyPI2.108.0OSV
- docling-slim, PyPI2.109.0OSV
- docling-slim, PyPI2.110.0OSV
- docling-slim, PyPI2.111.0OSV
- docling-slim, PyPI2.112.0OSV
- docling-slim, PyPI2.113.0OSV
- docling-slim, PyPI2.114.0OSV
- docling-slim, PyPI2.115.0OSV
- docling-slim, PyPI2.116.0OSV
- docling-slim, PyPI2.117.0OSV
- docling-slim, PyPI2.118.0OSV
- docling-slim, PyPI2.118.1OSV
- docling-slim, PyPI2.119.0OSV
- docling-slim, PyPI2.120.1OSV
- docling-slim, PyPI2.120.2OSV
- docling-slim, PyPI2.120.3OSV
- docling-slim, PyPI2.121.0OSV
- docling-slim, PyPI2.122.0OSV
- docling-slim, PyPI2.123.0OSV
- docling-slim, PyPI2.123.1OSV
- docling-slim, PyPI2.124.0OSV
- docling-slim, PyPI2.125.0OSV
- docling-slim, PyPI2.126.0OSV
- docling-slim, PyPI2.127.0OSV
- docling-slim, PyPI2.128.0OSV
- docling-slim, PyPI2.129.0OSV
- docling-slim, PyPI2.130.0OSV
- docling-slim, PyPI2.131.0OSV
- docling-slim, PyPI2.92.0OSV
- docling-slim, PyPI2.93.0OSV
- docling-slim, PyPI2.94.0OSV
- docling-slim, PyPI2.95.0OSV
- docling-slim, PyPI2.96.0OSV
- docling-slim, PyPI2.96.1OSV
- docling-slim, PyPI2.97.0OSV
- docling-slim, PyPI2.98.0OSV
- docling-slim, PyPI2.99.0OSV
References 6
- github.com/docling-project/docling/commit/5e469137f275ffc443306a30d12a3a45bceb80fbFixvia CVE List
- github.com/docling-project/docling/releases/tag/v2.132.0Fixvia CVE List
- github.com/docling-project/docling/security/advisories/GHSA-pc36-qwjq-x68cAdvisoryvia CVE List
- github.com/advisories/GHSA-pc36-qwjq-x68cAdvisoryvia GitHub
- nvd.nist.gov/vuln/detail/CVE-2026-105743Referencevia GitHub
- github.com/docling-project/docling/pull/4420Referencevia CVE List