Summary
CVE-2026-85687 is an unauthenticated arbitrary file read vulnerability (CWE-73: External Control of File Name or Path) affecting the screenshot server component of Surya (PyPI package surya-ocr), an open-source OCR/document layout analysis tool maintained by datalab-to. The flaw allows any network-based attacker to retrieve image and PDF files from the host filesystem without authentication. The issue carries a CVSS v4.0 base score of 8.7 (High) / CVSS v3.1 base score of 7.5 (High).
Technical details
- Root cause: The Flask-based screenshot server accepts a user-supplied
file_pathparameter and passes it, without validation or sanitization, directly into internal file-processing helper functions (_page_count()and_render_page()). No containment or workspace restriction is applied to the supplied path. - Trigger conditions: The server listens on
0.0.0.0:8504by default with no authentication decorator on any route, meaning it is reachable from the network without credentials whenever exposed. - Attack vector: Remote/network — an attacker sends crafted requests to the
/info,/page, or/processendpoints, supplying an arbitrary file path instead of an expected in-workspace file reference. - Impact: Unauthenticated disclosure of arbitrary image and PDF files on the host, including files outside the intended workspace directory; the
/infoendpoint can also be used to enumerate whether specific file paths exist on the system, aiding further reconnaissance. There is no reported impact to integrity or availability — the vulnerability is limited to confidentiality (file read).
Affected software
- Product: Surya screenshot server (PyPI package
surya-ocr), vendor datalab-to - Affected versions: All versions through 0.22.1 (0 – 0.22.1)
Severity
- CVSS v3.1: 7.5 (High) —
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - CVSS v4.0: 8.7 (High) —
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
Mitigation and recommended actions
- Immediate: As of publication, no fixed release has been assigned in the upstream tracking issue; monitor the datalab-to/surya repository for a patched release and upgrade as soon as one is available.
- Workarounds / network mitigations (until patched):
- Do not expose the Surya screenshot server (default port 8504) directly to untrusted networks or the public internet; bind it to
localhost/127.0.0.1instead of0.0.0.0. - Place the service behind an authenticating reverse proxy or VPN, since the application itself performs no authentication on the
/info,/page, or/processroutes. - Restrict the file paths accessible to the service (e.g., via filesystem permissions, containerization, or a chroot/jail) so that even if
file_pathis manipulated, no sensitive files outside the intended workspace can be reached. - Monitor logs for requests to
/info,/page, and/processcontaining path traversal sequences (../) or absolute paths outside the expected document directory.
- Do not expose the Surya screenshot server (default port 8504) directly to untrusted networks or the public internet; bind it to

