CVE-2026-119342: Stirling-PDF: SVG→PDF local file read (LFI) via SVG-sanitizer and Batik same-origin bypass
Stirling-PDF is a locally hosted web application that facilitates various operations on PDF files. From 2.13.1 until 2.13.2, the POST /api/v1/convert/svg/pdf endpoint renders attacker-supplied SVG through Apache Batik, and a scheme-less root-relative image reference bypasses SvgSanitizer.isExternalUrl() before Batik resolves it against the file:///input.svg document base as a same-origin local file. The convert() and addSvgAsPage() paths in app/core/src/main/java/stirling/software/SPDF/utils/SvgToPdf.java can then render image-decodable server files into the returned PDF when sanitization is enabled, including without authentication on login-disabled deployments or with non-admin access when login is enabled. The issue discloses PNG, JPG, GIF, or SVG content and provides an existence oracle only for image-decodable paths; plain text, binary files, directories, XInclude text, external entities, explicit file URLs, and tested HTTP references are not disclosed through this mechanism. This issue is fixed in version 2.13.2.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Stirling-PDFto a version that resolves this vulnerability.Fixed in 2.13.2
Event History
Frequently Asked Questions
Which deployments are exposed without authentication?
Login-disabled deployments allow unauthenticated access to the affected SVG-to-PDF endpoint. When login is enabled, a non-admin user can exploit the issue.
What must an attacker provide to exploit the issue?
An attacker needs to submit an SVG to POST /api/v1/convert/svg/pdf containing a scheme-less, root-relative image reference. The vulnerable renderer resolves that reference as a same-origin local file.
What data can be disclosed through this issue?
The returned PDF can disclose server files that are decodable as PNG, JPG, GIF, or SVG, and can act as an existence oracle for image-decodable paths. It does not disclose plain-text files, arbitrary binary files, directories, XInclude text, external entities, explicit file URLs, or the tested HTTP references through this mechanism.
What should teams do to remediate the issue?
Upgrade to version 2.13.2, which fixes the issue. The available data does not identify an alternative mitigation for deployments that cannot immediately upgrade.