Summary
Summarize versions prior to 0.15.1 expose a path traversal issue in the /v1/summarize daemon endpoint that lets authenticated callers control where slide image and JSON files are written on disk.
By abusing the slidesDir parameter with absolute paths or directory traversal sequences, an attacker can cause the service to write and later delete slide_*.png and slides.json files in arbitrary writable directories, enabling data manipulation and potential interference with other components.
Affected context
The vulnerability appears in deployments of the Summarize service that expose the /v1/summarize daemon endpoint and rely on the slidesDir request parameter to control where slide artifacts are stored.
It is relevant when:
- The service runs with permissions to write to directories beyond its intended working area
- Callers can supply arbitrary values for
slidesDir, including absolute paths or../sequences - Other application data or configuration resides in directories writable by the Summarize process
Exploit preconditions
- Attack surface: HTTP/daemon API, specifically the
/v1/summarizeendpoint. - Required access: Authenticated access to the Summarize API (ability to invoke
/v1/summarize). - Trigger point: Providing an absolute path or path traversal sequence in the
slidesDirparameter when requesting slide extraction. - Why exploitation is possible: The handler trusts the caller-provided
slidesDirvalue without robust canonicalization, normalization, or restriction to a safe base directory, allowing arbitrary file system locations to be targeted for write and subsequent cleanup.
Why this happens
This issue stems from insufficient authorization and path handling logic in the file output workflow for the /v1/summarize endpoint.
The service treats the slidesDir parameter as a trusted, fully qualified directory path and combines it with predictable filenames (slide_*.png and slides.json) without constraining the base directory.
Conceptually, this aligns with a path traversal and improper authorization pattern where authenticated users are granted broader file system access than intended, mapping to CWE-862: Missing Authorization in that there is no finer-grained check that the chosen directory is within an allowed scope or belongs to the requesting principal.
Potential impact
- Authenticated users could write
slide_*.pngandslides.jsonfiles into arbitrary writable directories. - Attackers may overwrite or clutter application directories, logs, or temporary folders, potentially disrupting normal operation.
- Repeated extraction could be used to delete previously written matching files in target directories.
- Information integrity could be affected if other components consume or rely on files in directories impacted by these writes.
- In multi-tenant or shared environments, one tenant could interfere with another tenant's data stored in shared writable paths.
General mitigation guidance
Effective mitigation centers on tightening both authorization and file system boundaries:
- Constrain
slidesDirto a fixed, server-controlled base directory and reject absolute paths or any input that resolves outside this root. - Normalize and canonicalize requested paths before use, then enforce strict checks that the resolved path remains within allowed directories.
- Implement per-tenant or per-user directory scoping, ensuring callers can only target directories associated with their own identity or workspace.
- Reduce the service account's file system privileges so it can only write to explicitly designated data directories.
- Apply defensive defaults such as ignoring custom directories altogether and using generated, internal paths unless explicitly required.
How teams detect issues like this
Organizations can detect and monitor for this class of vulnerability using:
- Static analysis rules that flag concatenation of user-controlled path parameters (like
slidesDir) into file system APIs without normalization or base-path checks. - Code review checklists that require reviewers to confirm that all file-writing endpoints enforce directory whitelisting and per-user scoping.
- Runtime logging of requested
slidesDirvalues, with alerts on suspicious patterns such as absolute paths,..segments, or unexpected target directories. - Security testing or fuzzing focused on file-system-related parameters, verifying that attempts to escape the intended storage directory are properly blocked.

