Summary
A path traversal vulnerability in 4gaBoards allows an authenticated project manager to manipulate an export filename and access files outside the intended export directory. Because the selected path is also passed to a file-deletion operation, exploitation may expose sensitive data and delete files readable by the server process.
Affected context
The issue occurs in the export download endpoint when a project manager can provide a filename that is decoded and joined with a server-side export directory. Deployments are at risk when the resulting path is not verified to remain within the intended per-user export location and the process has access to sensitive or operationally important files.
Exploit preconditions
- Attack surface: The authenticated export download endpoint
- Required access: A valid account with project-manager permissions
- Trigger point: Processing the filename component of an export download request
- Why exploitation is possible: Traversal sequences are combined with a trusted base directory without canonical-path containment validation
- Additional condition: The server process must be able to read or remove the targeted file
Why this happens
The vulnerability is caused by treating a user-controlled path component as safe after URL decoding and passing it directly to path construction logic. Path joining alone does not prevent traversal because parent-directory components can escape the intended base directory. The same unvalidated path is later used for deletion, extending the issue from unauthorized file access to arbitrary deletion of files within the process's permissions. This behavior maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory.
Potential impact
- An attacker may read sensitive configuration, credential, or application files
- An attacker could delete files accessible to the server process
- The application may experience data loss or denial of service
- Exposed secrets could enable further compromise of connected systems
- Project or export data may be disclosed across trust boundaries
General mitigation guidance
Mitigation generally focuses on treating export identifiers and filenames as untrusted data and enforcing a strict directory boundary.
Common defensive patterns include:
- Resolve candidate paths canonically and verify that they remain beneath the intended export directory
- Prefer opaque server-generated export identifiers over user-supplied filesystem paths
- Reject traversal components, absolute paths, null bytes, and unexpected separators after decoding
- Separate download authorization from filesystem path construction
- Avoid deleting files based directly on request-derived paths; use validated internal metadata instead
- Run the service with the least filesystem privileges necessary and isolate export storage
- Apply read-only or controlled storage permissions where deletion is not required
How teams detect issues like this
Organizations can identify similar issues through:
- Static analysis rules for path construction using request parameters
- Code review checks for path.join(), resolve(), or equivalent APIs followed by file access without containment validation
- Tests covering encoded and decoded traversal sequences, absolute paths, alternate separators, and symlink behavior
- Runtime monitoring for unusual export-download requests and file deletions outside approved directories
- Policy enforcement requiring canonical-path boundary checks before read, write, rename, or delete operations
Automated code review tools may help flag request-controlled filesystem operations for manual assessment.

