Summary
Many Notes contains a path traversal vulnerability in its ZIP vault import process, allowing an authenticated user to write files outside the intended vault directory. This may enable overwriting files in other users' vaults and placing content that can trigger stored cross-site scripting when a victim opens the affected vault.
Affected context
The vulnerability occurs in deployments that allow authenticated users to import ZIP-based vaults through the Many Notes web application. It becomes risky when archive entry filenames are extracted without securely normalizing and constraining their resolved paths to the importing user's vault, particularly where users' vaults share a filesystem or storage namespace.
Exploit preconditions
- Attack surface: ZIP vault import functionality in the Many Notes web application
- Required access: An authenticated Many Notes account able to submit or import a vault archive
- Trigger point: Processing archive entries during ZIP extraction
- Why exploitation is possible: Archive filenames containing parent-directory traversal segments can resolve outside the intended vault directory, allowing files to be created or overwritten in other permitted storage locations
Why this happens
The underlying bug is improper validation of archive member paths before extraction. When filenames containing parent-directory traversal components are trusted or insufficiently canonicalized, the extraction routine may write to locations outside the designated destination directory.
This behavior maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'). The insecure pattern is extracting attacker-influenced archive entries without verifying that each normalized destination remains within the intended vault boundary.
Potential impact
- An attacker may write arbitrary files outside their own vault
- Existing files in another user's vault may be overwritten
- Malicious SVG or other web-served content may be placed in a victim's vault
- Stored cross-site scripting may execute when a victim opens the affected vault
- Vault contents or application behavior may be modified
- The application or affected users may experience integrity or confidentiality impacts
General mitigation guidance
Mitigation typically focuses on enforcing a strict extraction boundary and reducing trust in archive metadata.
Common defensive patterns include:
- Normalize each archive entry path before joining it with the destination directory
- Reject absolute paths, parent-directory traversal segments, and paths that resolve outside the target vault
- Use extraction APIs or wrappers that enforce destination confinement by default
- Treat archive contents as untrusted and validate filenames before writing any files
- Apply per-user filesystem isolation and least-privilege permissions to vault storage
- Restrict or safely serve active content types, including SVG, from user-controlled vaults
- Prevent overwrites where business logic does not require them and maintain audit records for imports
How teams detect issues like this
Organizations commonly detect archive extraction traversal through:
- Static analysis rules for archive extraction followed by path concatenation or file writes
- Code review checks for canonical-path validation and destination-boundary enforcement
- Tests using absolute paths, parent-directory segments, encoded separators, and nested archive entries
- Runtime monitoring for writes outside a user's assigned vault directory
- File integrity monitoring for unexpected changes to other users' vaults
- Content security policies and web-server rules that reduce the impact of uploaded active content
- Automated security review tools that identify unsafe archive handling patterns

