CVE-2026-85714: Stirling-PDF: Remote Code Execution via H2
Stirling-PDF is a locally hosted web application that facilitates various operations on PDF files. Prior to 2.13.2, an authenticated administrator using the default H2 database and security mode can upload a crafted SQL file to POST /api/v1/database/import-database. DatabaseService.validateSqlContent() splits normalized input on semicolons and accepts a statement when it contains any allowed keyword, allowing dangerous H2 functions such as FILEREAD and CSVWRITE, plus CREATE ALIAS, to bypass the insufficient whitelist and execute side effects when RUNSCRIPT processes the file. This permits arbitrary file access. The demonstrated operating-system command execution chain writes attacker-controlled startup files to a user-site location and then triggers an application Python interpreter configured to load those startup files, resulting in command execution as the JVM service account. 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
Who is exposed to exploitation?
Stirling-PDF deployments prior to 2.13.2 are exposed when they use the default H2 database and security mode. Exploitation requires an authenticated administrator account.
What access and endpoint does an attacker need?
An attacker needs administrator authentication and the ability to send a crafted SQL file to POST /api/v1/database/import-database. No user interaction is required.
What can a successful attacker do?
The vulnerable SQL validation can permit H2 functions including FILE_READ, CSVWRITE, and CREATE ALIAS during database import. This enables arbitrary file access and can be chained to execute operating-system commands as the JVM service account.
What version fixes the issue?
Upgrade Stirling-PDF to version 2.13.2. The issue affects versions prior to 2.13.2.