Back to skill

Security audit

claudemem — Persistent Agent Memory & Notes

Security checks for vulnerabilities and agentic risk

Overview

This persistent-memory skill is purpose-aligned but needs review because it silently stores conversation-derived data and uses unpinned remote installation paths despite claiming zero network.

Install only after reviewing the installer and preferably using a pinned, checksummed release. Treat the memory store as durable local records: avoid using this skill around secrets, tokens, private URLs, personal data, or confidential project details unless you have confirmed how to review and delete saved notes. The artifact is not clearly malicious, but its installation and automatic persistence behavior need explicit user control.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (4)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:38
Finding

Mutable Remote Installer Is Piped Directly Into a Shell

Content
View full analysis
Remediation
View remediation
/skills/claudemem/scripts/install.sh" echo " /tmp/claudemem-install.sh" | sha256sum -c - bash /tmp/claudemem-install.sh ``` ]]>

T03 · Remote Payload Retrieval and Execution

Error
Location
scripts/install.sh:61
Finding

Installer Downloads and Executes an Unverified Mutable Release Binary

Content
View full analysis
/dev/null; then chmod +x "${INSTALL_DIR}/claudemem" echo -e "${GREEN}✓ Installed claudemem to ${INSTALL_DIR}/claudemem${NC}" else echo -e "${BLUE}→ Pre-built binary not available. Trying go install...${NC}" if command -v go &>/dev/null; then GOBIN="${INSTALL_DIR}" go install "github.com/${REPO}@latest" echo -e "${GREEN}✓ Installed via go install${NC}" elif [ -f "$HOME/.local/go/bin/go" ]; then GOBIN="${INSTALL_DIR}" "$HOME/.local/go/bin/go" install "github.com/${REPO}@latest" ``` ```bash # Verify installation echo "" if [ -x "${INSTALL_DIR}/claudemem" ]; then echo -e "${GREEN}✓ Installation complete!${NC}" # Check if in PATH if ! command -v claudemem &>/dev/null; then echo "" echo -e "${BLUE}→ Add to PATH if not already:${NC}" echo " export PATH=\"${INSTALL_DIR}:\$PATH\"" fi echo "" "${INSTALL_DIR}/claudemem" --version 2>/dev/null || true ``` ### Technical Analysis The installer retrieves an executable from the mutable GitHub `releases/latest/download` endpoint, writes it directly to an executable search location, marks it executable, and runs it using `--version`. It performs no checksum, signature, provenance, or expected-version verification. If the binary download fails, the fallback runs `go install` with `@latest`, which is also a mutable dependency reference. Neither ...[truncated 1696 chars]
Remediation
View remediation

other

Warning
Location
SKILL.md:103
Finding

Skill Silently Persists Potentially Sensitive Conversation and Environment Information

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
commands/save-session.md:23
Finding

Generated Conversation Content Is Embedded in Shell Command Templates

Content
View full analysis
' | claudemem session save \ --title "" \ --branch "$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo 'unknown')" \ --project "$(pwd)" \ --session-id "$(date +%Y%m%d-%H%M%S)" \ --tags "" ``` The same pattern appears in `commands/wrap-up.md:40-46`: ```bash printf '' | claudemem session save \ --title "" \ --branch "$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo 'unknown')" \ --project "$(pwd)" \ --session-id "$(date +%Y%m%d-%H%M%S)" \ --tags "<tags>" ``` ### Technical Analysis The command templates instruct the Agent to substitute model-generated, conversation-derived Markdown, titles, and tags directly into shell syntax. The summary is placed inside a single-quoted `printf` argument, while the title and tags are placed inside double-quoted arguments. If implemented literally, an apostrophe in generated Markdown can terminate the single-quoted string. Additional shell metacharacters can then be parsed as commands. Within double quotes, unescaped command substitutions such as `$(...)` or backticks in generated titles or tags can also be evaluated by the shell. The vulnerability depends on the Agent translating the illustrative placeholders into a literal shell command without robust escaping. The instructions provide no safe encoding or non-shell mechanism, making that behavior reasonably foreseeable. ### Attack Path 1. An attacker places crafted text in the conversation, such as content containing a quote followed by shell syntax. 2. The Agent incorporates that text into the generated summary, title, or tags. 3. During `/save-session` or ...[truncated 1063 chars]
Remediation
View remediation
"$summary_file" claudemem session save \ --title "$SESSION_TITLE" \ --branch "$SESSION_BRANCH" \ --project "$SESSION_PROJECT" \ --session-id "$SESSION_ID" \ --tags "$SESSION_TAGS" <"$summary_file" ``` The caller should set each variable as data through a process API rather than generating a shell command containing those values. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
Findings (19)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill claims to be 'All local, zero network' while directing users/agents to fetch and execute a remote GitHub installer, then run an installed binary. That mismatch can mislead users and agents into trusting behavior they would otherwise scrutinize, enabling supply-chain compromise or unexpected host modification.

Content

No source excerpt is available for this finding.

Chaining Abuse

High
Category
Tool Misuse
Confidence
99% confidence
Finding

curl ... | bash is a classic high-risk pattern because it combines remote retrieval and execution in one step with no opportunity for inspection or integrity validation. In this skill, the danger is amplified by the misleading 'zero network' framing, which may lower user suspicion and lead to arbitrary code execution on the machine.

Content

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

Before first use, verify the CLI is installed. If claudemem is not found on PATH, install it:

bash
curl -fsSL https://raw.githubusercontent.com/zelinewang/claudemem/main/skills/claudemem/scripts/install.sh | bash

Or run the bundled installer:

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill instructs automatic note-saving during normal conversation without prior warning or consent, which can persist sensitive user data, secrets, internal URLs, or project details. A brief post-save indicator is insufficient because the privacy-sensitive action has already occurred.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill instructs the agent to review the entire conversation and persist important knowledge, including user preferences, without any privacy notice, consent gate, or per-item confirmation. This creates a real risk of storing sensitive personal, proprietary, or contextual information beyond the user's expectations, with cross-session privacy impact.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The installer contradicts the skill's 'All local, zero network' claim by downloading a binary from GitHub and, on fallback, fetching and building code from a remote repository via 'go install ...@latest'. This creates a supply-chain risk because installation depends on mutable remote content and can execute unreviewed code or install a tampered release if the upstream account, release artifacts, or dependency chain are compromised.

Content

No source excerpt is available for this finding.

Chaining Abuse

High
Category
Tool Misuse
Confidence
96% confidence
Finding

The '| bash' chaining pattern is a direct remote-code-execution mechanism: data retrieved over the network is piped straight into a shell interpreter. In the context of an installer, this materially increases risk because the skill is effectively asking users to trust and run unaudited network content, which is especially concerning given the metadata's 'All local, zero network' representation.

Content

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

sh
#!/bin/bash
# claudemem universal installer
# Usage: curl -fsSL https://raw.githubusercontent.com/zelinewang/claudemem/main/skills/claudemem/scripts/install.sh | bash

set -e

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill clearly instructs shell execution (curl ... | bash, bash "SKILL_DIR/scripts/install.sh", and repeated claudemem CLI invocations) but does not declare any tool scope or allowed-tools restrictions. This increases the chance an agent will execute shell commands without explicit capability boundaries or user awareness, which is risky in a skill that also performs autonomous actions.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Advertising 'All local, zero network' while embedding a curl download-and-execute setup command is deceptive and weakens informed consent. Users may permit the skill under a false assumption that no external communication or remote code retrieval occurs.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Broad natural-language triggers such as 'remember this', 'save this', or 'wrap up' can easily appear in ordinary conversation and unintentionally activate persistence operations. In a memory skill, ambiguous activation is particularly risky because it can cause sensitive or incidental data to be stored without deliberate user intent.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
82% confidence
Finding

Automatic wrap-up before session end is less severe than silent note capture because it is conditioned on user configuration, but it still authorizes autonomous persistence actions. If the configuration is enabled without careful understanding, the agent may save summaries and extracted knowledge the user did not intend to retain.

Content

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

md
### Recommended: Auto Wrap-Up Before Session Ends

If the user has enabled auto wrap-up in their CLAUDE.md, automatically execute /wrap-up before the conversation ends:
1. Extract unsaved knowledge fragments → save as notes (with dedup)
2. Generate session summary → save as session
3. Show brief report of what was saved

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
90% confidence
Finding

Autonomous saving 'without asking' delegates privacy-sensitive decisions to the agent, which may misclassify information as safe to retain. In a memory skill, that autonomy directly affects long-term data retention and can store confidential material beyond the user's intent.

Content

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

Auto-Save Notes (Silent + Brief Indicator)

Automatically capture knowledge without asking during normal conversation. After saving, add a brief indicator at the end of your response so the user knows what was captured:

text

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill directs the agent to persist user-provided and session-derived information 'without asking first', creating a privacy and data-governance risk. Because the content is meant to survive across conversations, unintended storage can compound over time and expose more context than the user expected.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
79% confidence
Finding

The workflow explicitly creates, updates, and appends persistent session-related content, which creates retention risk when combined with autonomous extraction. While persistence is central to the skill's purpose, the danger comes from storing data across sessions without robust consent, minimization, and review controls.

Content

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

md
**How to auto-save gracefully:**
1. Identify the knowledge fragment during your normal response
2. Choose an appropriate category (create new if none fits)
3. Before saving, quickly search to avoid duplicates: `claudemem note search "keyword" --format json`
4. If related note exists: `claudemem note append <id> "new info"` instead of creating duplicate
5. Save: `claudemem note add <category> --title "..." --content "..." --tags "..."`

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This command is explicitly designed to retrieve and display persistent memory, including recent sessions and note contents, but it provides no warning, consent boundary, or sensitivity filtering before exposing stored data back to the user. Because memory may contain prior conversation summaries, preferences, API details, or other sensitive context, an unsuspecting user could trigger disclosure of information they did not intend to reveal in the current session.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The command instructs the agent to save the entire conversation history into persistent memory, but it does not require an explicit user-facing warning or consent flow before storing potentially sensitive content. Because this skill is specifically designed for durable cross-session memory, users may unintentionally persist secrets, personal data, internal project details, or other confidential material beyond the current session.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The command is framed as a broad end-of-session action and can plausibly trigger on ordinary wrap-up phrasing, causing memory writes without a narrowly scoped, explicit user action. In a persistent-memory skill, ambiguous invocation increases the chance of unintended storage of sensitive or private conversation content.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The command directs the agent to persistently store broad conversation-derived information, including learned preferences and 'everything important,' which is overly expansive for memory collection. Even without network exfiltration, local persistent storage can accumulate sensitive behavioral and project data that may later be surfaced or misused across sessions.

Content

No source excerpt is available for this finding.

External Script Fetching

Low
Category
Supply Chain
Confidence
96% confidence
Finding

Fetching an external script from GitHub at install time introduces a supply-chain risk: the remote content can change, be compromised, or be substituted in transit by a trusted-but-malicious source. Because the script is immediately executed, any compromise yields code execution on the host.

Content

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

Before first use, verify the CLI is installed. If claudemem is not found on PATH, install it:

bash
curl -fsSL https://raw.githubusercontent.com/zelinewang/claudemem/main/skills/claudemem/scripts/install.sh | bash

Or run the bundled installer:

External Script Fetching

Low
Category
Supply Chain
Confidence
93% confidence
Finding

The documented installation method tells users to fetch a shell script directly from GitHub and execute it immediately. This is dangerous because it bypasses review of the script contents and turns any compromise of the repository, branch, hosting path, or transport endpoint into immediate code execution on the user's machine.

Content

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

sh
#!/bin/bash
# claudemem universal installer
# Usage: curl -fsSL https://raw.githubusercontent.com/zelinewang/claudemem/main/skills/claudemem/scripts/install.sh | bash

set -e