Summary
DeepAudit's project import and ZIP upload workflows may allow authenticated users to write files outside the intended project directory when crafted project identifiers and symlink handling are involved. Under those conditions, an attacker could overwrite application files and potentially achieve remote code execution.
Affected context
The issue involves DeepAudit's project import endpoint and subsequent ZIP upload workflow. It may arise when imported project identifiers influence filesystem paths without adequate containment checks, and uploaded archive processing follows symlinks in a way that permits writes outside the intended project area.
Exploit preconditions
- Attack surface: Authenticated API access to project import and ZIP upload functionality
- Required access: An account authorized to submit project imports and uploads
- Trigger point: Processing an imported project and its uploaded archive
- Why exploitation is possible: Project identifiers may affect filesystem destinations, while insufficient path and symlink safeguards can permit writes beyond the intended directory
Why this happens
The underlying issue is a failure to constrain filesystem paths derived from user-controlled project identifiers and archive contents. If paths are not canonicalized and verified to remain within an approved directory—and symlink behavior is not safely handled—crafted input may escape the intended storage boundary. This is a path traversal weakness mapped to CWE-22: Improper Limitation of a Pathname to a Restricted Directory.
Potential impact
- Attackers may overwrite files outside the intended project directory
- Application code or configuration may be modified
- Remote code execution may be possible if executable application files are overwritten and subsequently run
- Application integrity, availability, or data confidentiality could be affected
General mitigation guidance
Defensive approaches focus on keeping all import and upload writes within explicitly approved storage locations.
Common patterns include:
- Treating project identifiers and archive paths as untrusted input
- Resolving and canonicalizing destination paths, then verifying containment within the intended root
- Rejecting absolute paths and traversal components
- Avoiding symlink-following writes, or safely validating symlinks before use
- Extracting archives into isolated, non-executable storage with least-privilege filesystem permissions
- Separating uploaded content from application code and runtime configuration
How teams detect issues like this
Detection can combine static analysis, code review, and runtime controls:
- Review filesystem operations that build paths from project identifiers or archive entry names
- Look for missing canonicalization, containment checks, or symlink handling around file writes
- Use static analysis rules for path traversal and unsafe archive extraction patterns
- Enforce policies that restrict upload destinations to dedicated storage directories
- Monitor for unexpected writes to application code, configuration, or other protected paths

