CVE-2026-137954: Pydantic Deep 0.2.18 before 0.4.0 SSRF and File Read via /export/pdf
Pydantic Deep 0.2.18 before 0.4.0 contains a server-side request forgery and local file read vulnerability in the DeepResearch exportreport handler for /export/pdf. Attackers can inject raw HTML into reports via the unauthenticated /upload endpoint, causing WeasyPrint to fetch internal URLs and embed local server files into exported PDFs.
Affected Software
Event History
Frequently Asked Questions
Which deployments are exposed?
Pydantic Deep versions from 0.2.18 up to, but not including, 0.4.0 are affected. Exposure requires the DeepResearch export_report handler at /export/pdf and the unauthenticated /upload endpoint to be reachable by an attacker.
What does an attacker need to exploit this issue?
No authentication or user interaction is required. An attacker can submit raw HTML through /upload and trigger PDF export processing so that WeasyPrint retrieves internal URLs or local server files.
What data could be exposed?
The vulnerability can cause internal network resources requested by WeasyPrint to be fetched and can embed local files from the server into exported PDFs. The provided data does not identify specific file paths or internal services.
What is the available remediation?
Upgrade to version 0.4.0, which is identified as the fixed release. The provided data does not specify a workaround for environments that cannot upgrade immediately.