memory-search
Fail
Audited by Gen Agent Trust Hub on Mar 15, 2026
Risk Level: HIGHDATA_EXFILTRATIONCOMMAND_EXECUTIONPROMPT_INJECTION
Full Analysis
- [DATA_EXFILTRATION]: Path Traversal Vulnerability in the
getaction. - In
run.py, thegetfunction constructs a file path by joining the memory directory with a user-providedfileargument using the/operator:filepath = _MEMORY_DIR / filename. - Because the code does not validate the input or resolve the path to ensure it stays within the intended directory, an attacker can provide an absolute path (e.g.,
/etc/passwd) or relative path sequences (e.g.,../../.ssh/id_rsa) to read arbitrary files from the system. - [COMMAND_EXECUTION]: Command Argument Injection in the
searchaction. - The
searchfunction inrun.pyusessubprocess.runto execute the system'sgreputility. - The user-supplied
queryis passed directly as a command-line argument. While this does not allow for full shell injection becauseshell=Trueis not used, it does allow for argument injection. An attacker could provide a query starting with hyphens (e.g.,--helpor othergrepflags) to manipulate the behavior of the search or bypass restrictions. - [PROMPT_INJECTION]: Indirect Prompt Injection Attack Surface.
- The skill is designed to search and read Markdown files from a local directory, which could contain malicious instructions embedded by an attacker or a third party.
- Ingestion points: Files read and displayed via the
searchandgethandlers inrun.py. - Boundary markers: None. Content is extracted and returned to the agent context as a raw string without delimiters or instructions for the agent to ignore embedded commands.
- Capability inventory: The skill has read access to the filesystem and performs subprocess execution for searching.
- Sanitization: None. Content is read using
read_textand returned with only length-based truncation.
Recommendations
- AI detected serious security threats
Audit Metadata