Summary
Docudepot PDF Reader: PDF Viewer APP v1.0.34 contains an arbitrary file overwrite vulnerability where imported files can overwrite internal application files.
By abusing the file import process, an attacker may be able to execute arbitrary code or access sensitive information if they can control what file is imported and where it is written.
Affected context
The vulnerability occurs in the application's file import functionality when user-supplied files are written to internal storage without sufficient validation of file paths or target locations.
It becomes risky in environments where imported PDFs or related files can be supplied by untrusted sources or via external channels such as email, messaging apps, or shared storage.
The issue is particularly relevant on systems where the app has permissions to write into directories that influence code execution or store sensitive configuration or data files.
Exploit preconditions
- Attack surface: The PDF file import functionality of the Docudepot PDF Reader: PDF Viewer APP.
- Required access: Ability to convince a user to import or open a crafted file, or any other capability allowing control over the file import input.
- Trigger point: When the application processes and stores the imported file to its internal storage or configuration area.
- Why exploitation is possible: The application uses file paths derived from untrusted input without enforcing strict directory constraints or filename validation, allowing an attacker-controlled file to overwrite internal or sensitive files.
Why this happens
This vulnerability stems from improper handling of file paths and destinations when importing user-supplied content.
Instead of constraining imported files to a dedicated, non-sensitive directory with sanitized filenames, the application allows external input to influence which internal file is written.
This matches CWE-73: External Control of File Path, where an attacker can manipulate the path or name of a file used by the application, enabling overwriting of configuration files, stored code, or other sensitive resources.
Potential impact
- Overwriting application configuration files, which could be leveraged to change security settings.
- Replacing scripts, libraries, or executable components to achieve arbitrary code execution in the app's context.
- Corrupting internal data files, leading to data loss or application instability.
- Overwriting logs or audit trails to hide other malicious actions.
- Exposing sensitive information if files controlling access or encryption are overwritten or degraded.
General mitigation guidance
Effective mitigation generally focuses on strictly controlling write locations and decoupling external input from internal file paths:
- Restrict imported files to a dedicated, application-controlled directory that contains no executable code or sensitive configuration.
- Normalize and validate file paths to prevent directory traversal or path manipulation, rejecting any path that attempts to escape the allowed directory.
- Enforce safe filename policies (e.g., whitelisting characters, enforcing unique random names) instead of accepting attacker-controlled names directly.
- Use platform-level storage APIs that abstract away raw filesystem paths and enforce per-app sandboxes where possible.
- Apply least-privilege principles so the app cannot write to system-wide locations or other apps' data.
How teams detect issues like this
Detection can focus on both code-level and runtime indicators:
- Static analysis: Look for file write operations where paths incorporate user-controllable data (e.g., values derived from imported file metadata, URIs, or external intents) without canonicalization and directory checks.
- Code review: Flag any logic that assembles file paths from input parameters, especially when writing into configuration, cache, or code directories.
- Security testing: Perform dynamic tests using crafted file names and import sources to verify that paths are constrained to safe directories and cannot overwrite existing internal files.
- Policy enforcement: Integrate secure coding rules in CI/CD to block changes that introduce new unvalidated file write paths or expand write permissions to sensitive locations.

