Back to skill

Security audit

agentMemo

Security checks for vulnerabilities and agentic risk

Overview

agentMemo is a coherent persistent memory server, but its advertised isolation and localhost-only protections are not reliably enforced, so it needs review before use.

Install only in an isolated local environment after fixing the namespace authorization bugs, changing the default bind address to 127.0.0.1, improving secret handling, and adding privacy/retention controls. Do not use this for shared, multi-agent, or sensitive memories until those issues are addressed.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (6)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
server.py:238
Finding

Scoped API Keys Can Search and Export Unauthorized Namespaces

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
server.py:372
Finding

Batch Deletion Bypasses Namespace Authorization

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
server.py:428
Finding

SSE and WebSocket Subscriptions Bypass Namespace RBAC

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
server.py:537
Finding

Server Listens on All Interfaces Despite Localhost-Only Security Claim

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
server.py:435
Finding

WebSocket API Keys Are Transmitted in Query Strings

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
templates/dashboard.html:259
Finding

Stored Cross-Site Scripting Through Unescaped Namespace Values

Content
View full analysis
`
${ns.namespace} ${ns.memory_count} mem / ${ns.event_count} evt
` ).join(''); if (!d.length) el.innerHTML = 'No namespaces yet'; // Update namespace dropdown const sel = document.getElementById('search-ns'); const current = sel.value; sel.innerHTML = 'All namespaces' + d.map(ns => `${ns.namespace} (${ns.memory_count})` ).join(''); if (current) sel.value = current; } catch(e) {} } ``` ### Technical Analysis Namespace values originate from authenticated memory and event creation requests and are persisted in SQLite. The dashboard later inserts those values directly into `innerHTML`. The value appears in HTML text, an attribute, and an inline JavaScript handler without contextual escaping. A namespace containing quotes and markup can terminate the intended context and inject attacker-controlled HTML or JavaScript. The page defines an `esc()` helper for other values, but this helper is not used by `loadNamespaces()`. Even generic HTML escaping would not make interpolation into an inline JavaScript handler safe; the inline handler should be removed. ### Attack Path 1. An attacker with permission to create a memory or event chooses a crafted namespace containing HTML or JavaScript-breaking characters. 2. The namespace is persisted and returned by `/v1/namespaces`. 3. A us ...[truncated 795 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
Findings (63)

Tainted flow: 'req' from os.environ.get (line 35, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · benchmark/agentvault_eval.py (reported line 37)May include surrounding context.

python
body = json.dumps(data).encode() if data else None
    req = urllib.request.Request(url, data=body, method=method)
    req.add_header("Content-Type", "application/json")
    with urllib.request.urlopen(req, timeout=30) as resp:
        if resp.status == 204:
            return None
        return json.loads(resp.read())

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

Scanner excerpt · README.md (reported line 59)May include surrounding context.

md
| `GET` | `/v1/memories/search` | Search (semantic/keyword/hybrid) |
| `GET` | `/v1/memories/{id}` | Get memory by ID |
| `PUT` | `/v1/memories/{id}` | Update memory (creates version) |
| `DELETE` | `/v1/memories/{id}` | Delete memory |
| `GET` | `/v1/memories/{id}/versions` | Version history |
| `POST` | `/v1/memories/{id}/rollback` | Rollback to version |
| `POST` | `/v1/memories/batch` | Batch create/delete/search |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 32)May include surrounding context.

md
orn, sentence-transformers, hnswlib, aiosqlite, and other dependencies. Review `requirements.txt` before running. Prefer installing inside a virtualenv or conta

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · benchmark/ACCEPTANCE_CHECKLIST.md (reported line 16)May include surrounding context.

md
- [x] `GET /v1/memories/search` — Semantic / keyword / hybrid modes
- [x] `GET /v1/memories/{id}` — Retrieve by ID
- [x] `PUT /v1/memories/{id}` — Update with auto-versioning
- [x] `DELETE /v1/memories/{id}` — Delete
- [x] `GET /v1/memories/{id}/versions` — Version history
- [x] `POST /v1/memories/{id}/rollback` — Rollback to version
- [x] `POST /v1/memories/batch` — Batch create/delete/search

Credential Access

High
Category
Privilege Escalation
Confidence
97% confidence
Finding

The startup example encourages loading environment variables via env $(cat .env | xargs), which can expose the admin key in process arguments and break safely on special characters or whitespace. Combined with storing the admin key in .env, this creates another path for credential leakage to process monitors, logs, and shell history.

Content

Scanner excerpt · install.sh (reported line 51)May include surrounding context.

sh
echo "AGENTMEMO_ADMIN_KEY=$AGENTMEMO_ADMIN_KEY" >> "$ENV_FILE"
fi
echo ""
echo "✅ .env written to $ENV_FILE"

# Verify import
"$VENV_DIR/bin/python" -c "import server, database, embeddings, models, events; print('Import check: OK')"

Credential Access

High
Category
Privilege Escalation
Confidence
96% confidence
Finding

The documented command expands .env contents directly into a command line, which can leak the admin key through process lists and may mishandle shell metacharacters. In a skill meant to provide shared persistent memory with RBAC, compromise of the admin key could allow unauthorized access or administrative control over stored agent data.

Content

Scanner excerpt · install.sh (reported line 63)May include surrounding context.

sh
echo "  source .venv/bin/activate && python server.py"
echo ""
echo "Or with dotenv:"
echo "  env \$(cat .env | xargs) .venv/bin/python server.py"
echo ""
echo "Dashboard: http://localhost:${AGENTMEMO_PORT}/dashboard"
echo "Health:    http://localhost:${AGENTMEMO_PORT}/health"

Possible Typosquatting: 'uvicorn' resembles popular package 'gunicorn'

High
Category
Supply Chain
Confidence
70% confidence
Finding

Package name closely resembles a popular package, suggesting possible typosquatting. Attackers publish malicious packages with similar names to trick developers into installing them.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · install.sh (reported line 41)May include surrounding context.

sh
"$VENV_DIR/bin/pip" install -q --upgrade pip
"$VENV_DIR/bin/pip" install -q -r requirements.txt

# Write .env
ENV_FILE="$PWD/.env"
cat > "$ENV_FILE" <<EOF
AGENTMEMO_PORT=$AGENTMEMO_PORT

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/install.sh (reported line 41)May include surrounding context.

sh
"$VENV_DIR/bin/pip" install -q --upgrade pip
"$VENV_DIR/bin/pip" install -q -r requirements.txt

# Write .env
ENV_FILE="$PWD/.env"
cat > "$ENV_FILE" <<EOF
AGENTMEMO_PORT=$AGENTMEMO_PORT

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/install.sh (reported line 63)May include surrounding context.

sh
"$VENV_DIR/bin/pip" install -q --upgrade pip
"$VENV_DIR/bin/pip" install -q -r requirements.txt

# Write .env
ENV_FILE="$PWD/.env"
cat > "$ENV_FILE" <<EOF
AGENTMEMO_PORT=$AGENTMEMO_PORT

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · install.sh (reported line 42)May include surrounding context.

sh
"$VENV_DIR/bin/pip" install -q -r requirements.txt

# Write .env
ENV_FILE="$PWD/.env"
cat > "$ENV_FILE" <<EOF
AGENTMEMO_PORT=$AGENTMEMO_PORT
AGENTMEMO_DB=$AGENTMEMO_DB

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/install.sh (reported line 42)May include surrounding context.

sh
"$VENV_DIR/bin/pip" install -q -r requirements.txt

# Write .env
ENV_FILE="$PWD/.env"
cat > "$ENV_FILE" <<EOF
AGENTMEMO_PORT=$AGENTMEMO_PORT
AGENTMEMO_DB=$AGENTMEMO_DB

Credential Access

High
Category
Privilege Escalation
Confidence
96% confidence
Finding

This line writes the AGENTMEMO_ADMIN_KEY directly into a plaintext .env file. In the context of an agent memory server with RBAC and an admin key controlling privileged access, exposure of this value could allow unauthorized administration, data access, or cross-agent namespace compromise.

Content

Scanner excerpt · scripts/install.sh (reported line 51)May include surrounding context.

sh
echo "AGENTMEMO_ADMIN_KEY=$AGENTMEMO_ADMIN_KEY" >> "$ENV_FILE"
fi
echo ""
echo "✅ .env written to $ENV_FILE"

# Verify import
"$VENV_DIR/bin/python" -c "import server, database, embeddings, models, events; print('Import check: OK')"

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · README.md (reported line 67)May include surrounding context.

Store Memory

bash
curl -X POST http://localhost:8790/v1/memories \
  -H 'Content-Type: application/json' \
  -d '{
    "text": "User prefers dark mode",

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

This markdown file documents bulk import/export endpoints and elsewhere documents delete operations, but it does not include any user-facing warning that these actions can expose or remove stored memory data. For markdown files, SQP-2 applies when descriptions omit warnings about behaviors that could affect user data or system integrity.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · README.md (reported line 157)May include surrounding context.

All /v1/ requests require X-API-Key header. Create scoped keys:

bash
curl -X POST http://localhost:8790/v1/api-keys \
  -H "X-API-Key: my-secret-admin-key" \
  -H "Content-Type: application/json" \
  -d '{"name": "agent-a", "namespaces": ["agent-a", "shared"]}'

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill describes capabilities that involve environment secrets, local file/database writes, and network access, but it does not declare any explicit tool scope or allowed-tools restrictions. This creates a permission ambiguity where an agent may invoke the skill with broader capabilities than a reviewer expects, increasing the risk of unintended secret access, persistence, or outbound communication.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 64)May include surrounding context.

Store

bash
curl -X POST http://localhost:8790/v1/memories \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: your-secret-key' \
  -d '{"text": "User prefers dark mode", "namespace": "prefs", "tags": ["ui"], "importance": 0.9}'

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

This markdown file lists destructive and data-moving behaviors such as DELETE /v1/memories, rollback, and Import/Export JSON as accepted features, but it provides no warning that these actions can remove, overwrite, or expose stored memory data. For markdown files, the skill description should disclose behaviors that may affect user data or system integrity.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This Python file performs HTTP POST requests that send task seed text to the agentMemo server, including user-like preference, project-state, and correction data. Although the module docstring says a server is required, it does not clearly warn that running the script transmits benchmark content over HTTP to an external/local service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The demo promotes cross-session recall of work context and user preferences as an automatic feature, but it does not mention consent, retention limits, privacy boundaries, or the risk of storing sensitive project and preference data. In a memory skill specifically designed for persistent agent context, normalizing silent retention can lead to unexpected collection and reuse of personal or operational information.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The scenario presents automatic resumption of a deployment from remembered state as beneficial without warning that persisted state may be stale, incomplete, tampered with, or inconsistent with the live system. In operational workflows, blindly trusting remembered execution state can cause skipped validation, duplicate actions, failed migrations, or integrity-impacting changes in production.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The integration plan explicitly proposes persisting user preferences, project state, and chat memory across sessions, but it does not pair that persistence with consent, notice, retention disclosure, or clear handling rules for privacy-sensitive data. In the context of an agent memory system designed for long-lived cross-session storage, this can lead to over-collection, retention of sensitive personal or behavioral data, and compliance/privacy failures even if no direct code exploit is present.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The client defaults to an insecure base URL using plain HTTP, and this library is specifically meant to carry sensitive agent memory, search queries, metadata, and API keys across sessions. In non-local or misconfigured deployments, traffic can be intercepted or modified in transit, exposing confidential memory contents and credentials.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest describes agentMemo primarily as a semantic memory service for storing, searching, sharing namespaces with RBAC isolation, versioning, event streaming, and batch memory operations. This client also exposes creation, listing, and deletion of API keys, which is a separate administrative/security-management capability not declared as part of the skill's purpose or triggers.

Content

No source excerpt is available for this finding.