Summary
A path traversal flaw in EverOS's memory ingestion API allows the unvalidated sender_id field to be joined directly into filesystem paths during episode extraction.
If an attacker submits a crafted sender_id containing directory traversal sequences, they could create or overwrite Markdown files outside the intended memory root, leading to data tampering and potential content injection wherever the server process has write access.
Affected context
This vulnerability appears in EverOS deployments that expose the /api/v1/memory/add endpoint and rely on filesystem-backed storage for user memory episodes.
It is relevant where:
- The server process has write access to directories beyond the configured memory root
- The sender_id field is treated as owner_id and interpolated into a filesystem path
- Validation or normalization of per-message identifiers is missing or inconsistent compared to app_id and project_id
Exploit preconditions
- Attack surface: HTTP POST requests to
/api/v1/memory/add - Required access: Network access to the EverOS API; the issue description indicates this endpoint can be called without prior authentication in affected configurations
- Trigger point: Submission of a memory ingestion request whose sender_id includes path traversal tokens such as
../ - Why exploitation is possible: The sender_id field is directly used as an owner identifier and concatenated into the storage path for Markdown episode files without enforcing path-safe constraints, allowing traversal out of the designated memory root into other writable locations.
Why this happens
The bug stems from insufficient validation and canonicalization of user-controlled path components before constructing filesystem paths.
In EverOS, app_id and project_id are treated as path-safe identifiers, but sender_id was not subject to the same constraints. During user-memory extraction, sender_id is repurposed as owner_id and joined into the path where Markdown episodes are stored. Because this field accepts arbitrary strings, including ../ sequences, it enables directory traversal, aligning with CWE-22: Improper Limitation of a Pathname to a Restricted Directory.
Abstractly, this reflects a pattern where untrusted identifiers are interpolated into file paths without enforcing a strict, normalized namespace or rejecting traversal characters.
Potential impact
- Attackers may create new Markdown files outside the configured memory root in directories writable by the server process.
- Existing Markdown files within those writable locations could be overwritten with partially attacker-controlled content.
- Application behavior that consumes these files (e.g., agents reading episodes) could be influenced or corrupted.
- Logs, cached data, or auxiliary content stored alongside memory episodes may be tampered with.
- Under certain integrations, content injection into downstream systems that ingest these files can occur.
General mitigation guidance
Effective mitigation focuses on treating all path components derived from user or agent input as untrusted and constraining them to a safe namespace.
Common defensive patterns include:
- Enforcing strict validation on identifiers used in paths (e.g., sender_id) so they match a limited character set and length, rejecting traversal tokens and separators.
- Normalizing and resolving paths against a fixed memory root and explicitly verifying that the resulting path remains within that root before any read or write.
- Separating logical identifiers from physical paths, using indirection such as mapping IDs to opaque, server-generated directory names rather than concatenating user input directly.
- Applying least-privilege file system permissions so the EverOS process can only write within a dedicated storage area, reducing the blast radius of any path handling mistakes.
- Designing storage routines to treat content as data-only and avoiding any implicit execution or interpretation of stored Markdown beyond its intended use.
How teams detect issues like this
Detection typically involves a combination of code-level and operational safeguards:
- Static analysis rules that flag direct concatenation of request fields (such as sender_id) into file paths without validation or normalization.
- Code review checklists that require scrutiny of any path construction logic, ensuring all user-derived segments pass through a common path-safety utility.
- Security-focused tests or fuzzing that submit inputs containing
../, absolute paths, or unexpected separators to file-backed endpoints and observe where data is persisted. - Runtime logging of rejected path attempts and anomalous write destinations, paired with monitoring to identify unusual file creations or modifications in non-memory directories.
- Use of automated security scanning tools that highlight CWE-22 style risks in filesystem-accessing components.

