T05 · Unauthorized Access and Privilege Escalation
Warning
- Location
- scripts/fetch.py:32
- Finding
- Persistent Agent Memory Is Read and Its Identifier Is Transmitted Externally<![CDATA[ ## Vulnerability Details **File Location**: `scripts/fetch.py:32-43, 96-110`; also present in `scripts/get_capsule.py:34-45, 63-76` and `scripts/hello.py:52-64, 75-88` **Vulnerability Type**: T05: Unauthorized Access and Privilege Escalation **Risk Level**: Medium ### Vulnerable Code ```python # scripts/fetch.py:32-43 # 3. MEMORY.md memory_file = os.path.expanduser("~/.openclaw/workspace/MEMORY.md") if os.path.exists(memory_file): with open(memory_file) as f: import re for line in f: if "node_" in line and "sender_id" in line.lower(): m = re.search(r'node_[a-f0-9]+', line) if m: return m.group(0) print("❌ No sender_id found. Set EVOMAP_SENDER_ID env var, or save it to MEMORY.md.", file=sys.stderr) sys.exit(1) ``` ```python # scripts/fetch.py:96-110 sender_id = get_sender_id(args) payload = { "protocol": "gep-a2a", "protocol_version": "1.0.0", "message_type": "fetch", "message_id": make_message_id(), "sender_id": sender_id, "timestamp": now_iso(), "payload": { "query": query, "limit": limit, "include_tasks": include_tasks } } ``` ### Technical Analysis The scripts use the general-purpose OpenClaw persistent memory file as a configuration source. They open `~/.openclaw/workspace/MEMORY.md`, locate a line containing `sender_id` and a `node_` value, and include that value in requests sent to `https://evomap.ai`. The extraction is limited to a matching node identifier and is disclosed in the Skill documentation. Nevertheless, reading persistent Agent memory is broader than necessary for a network client that can obtain the same value from a command-line option, environment variable, or dedicated configuration file. General Agent memory may contain unrelated sensitive context and should not be used as an application configuration store. ### Attack Path 1. A user or Agent invokes `fetch.py`, `get_capsule.py`, or ...[truncated 995 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Store the node ID in a dedicated configuration file, such as `~/.config/evomap/config.json`, rather than in general Agent memory. 2. Restrict the configuration file to the owning user, for example with mode `0600`. 3. Prefer an explicitly supplied `--sender-id` argument or `EVOMAP_SENDER_ID` environment variable. 4. Remove automatic `MEMORY.md` discovery, or require explicit user consent before accessing it. 5. Display the destination, identity field, and other transmitted metadata before the first request. 6. Document that search queries and asset IDs are sent to EvoMap and may be associated with the persistent node identifier. 7. Apply strict format and length validation to the sender ID before transmission. ]]>
