state-diff
Fail
Audited by Gen Agent Trust Hub on Sep 16, 2026
Risk Level: HIGHDATA_EXFILTRATIONPERSISTENCEINDIRECT_PROMPT_INJECTION
Full Analysis
- [DATA_EXFILTRATION]: Path traversal vulnerability in the state analysis logic. The helper script
state_diff.pyreads file paths from a user-controlled or data-controlled JSON manifest and accesses them without validation. - Evidence: In
state_diff.py, thediff_memory_regionfunction constructs file paths usingbefore_dir / before_entry["file"]. Sincebefore_entryis parsed directly from thememory_map.jsonfile found within the snapshot directory, an attacker can specify absolute paths or traversal sequences (e.g.,../../etc/shadow) in the "file" field to force the script to read arbitrary files from the filesystem and include their contents in the diff report. - [PERSISTENCE]: Insecure file write vulnerability via unvalidated output paths. The skill allows for the redirection of its output report to arbitrary locations on the filesystem.
- Evidence: The
mainfunction instate_diff.pyaccepts an--outputargument and uses it to defineoutput_pathviaPath(args.output). The script then performsoutput_path.write_text(...)without verifying that the destination is within a safe directory. This can be exploited to overwrite sensitive configuration files, such as shell profiles (.bashrc) or SSH authorized keys, with the JSON-formatted diff report. - [INDIRECT_PROMPT_INJECTION]: The skill processes complex, untrusted data structures which serve as an attack surface for influencing agent behavior.
- Evidence:
- Ingestion points:
state_diff.pyingestsregisters.json,memory_map.json, and multiple binary files from snapshot directories which may be attacker-controlled. - Boundary markers: None. There are no instructions to the agent to treat the contents of the snapshots or the resulting
diff_report.jsonas potentially untrusted data. - Capability inventory: The skill possesses file read/write capabilities (via the Python script) and command execution capabilities (via the Bash tool).
- Sanitization: No validation or sanitization is performed on the snapshot data before it is processed by the script or presented to the agent for reasoning.
Recommendations
- AI detected serious security threats
Audit Metadata