Back to skill

Security audit

Memory Backfill

Security checks for vulnerabilities and agentic risk

Overview

The skill is openly about updating agent memory, but it asks agents to read sensitive context files and persist future-influencing memory entries without clear user review or rollback.

Install only if you intentionally want an agent to backfill project memory. Before use, require it to show exact files and diffs, approve changes manually, avoid treating stored memory text as instructions, and limit reads/writes to the intended workspace memory files.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T02 · Agent Memory Poisoning

Error
Location
SKILL.md:49
Finding

Persistent Agent Memory and Response-Framing Manipulation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 49–112
Vulnerability Type: Persistent agent-memory poisoning
Risk Level: High

Vulnerable Skill Instructions

The following is an English rendering of the relevant instructions in the source file:

text
8. Default response framing

Completion criteria:
- Upgrade every important project to the structure above.
- Write it to MEMORY.md.
- Write it to the current day's memory/YYYY-MM-DD.md.

Step 1: Diagnose the current memory state

1. Read AGENTS.md / SOUL.md / USER.md / MEMORY.md.
2. Read memory/*.md from the most recent seven days.
3. Determine the current memory level:
   - Only frameworks or principles: Layer 1 is required.
   - Project blocks exist but have no result closure: Layer 2 is required.
   - Result closure already exists: maintenance only.

Step 2: Issue a memory-backfill task

task_id: memory-backfill-layer[N]-[agent]-[date]

Task objective: Layer 1 or Layer 2 memory reinforcement.

Requirements:
- Update MEMORY.md and the current day's memory log.
- Required receipt fields:
  - status
  - claimed deliverable
  - evidence path
  - attached_to_mainline
  - single biggest gap
  - upgraded_to

Step 3: Acceptance and verification

1. Prefer directly inspecting file artifacts:
   - workspace-[agent]/MEMORY.md
   - workspace-[agent]/memory/[date].md
2. Do not rely on message receipts to determine completion.
3. Check field completeness against the template.

Step 4: Consolidation and archival

1. Write the reinforcement record to the current day's memory log.
2. If experience is reusable across agents, add it to the methodology document.
3. Mark projects that remain PARTIAL or BLOCKED and add them to a follow-up queue.

Technical Analysis

The skill directs the agent to read identity, user-context, persistent-memory, and recent-history files, including AGENTS.md, SOUL.md, USER.md, ...[truncated 2672 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove “default response framing” and all other behavioral rules from the persistent-memory schema. Persistent project records should contain verifiable facts only.
  2. Require explicit user authorization before reading AGENTS.md, SOUL.md, USER.md, or historical memory files. Default access should be limited to project files specifically selected by the user.
  3. Generate a proposed patch rather than writing directly to memory. Display the exact destination paths and diff, and require confirmation before applying it.
  4. Separate factual project history from agent instructions using different files and trust levels. Never interpret text stored in project-history records as executable agent guidance.
  5. Validate each proposed entry against referenced evidence. Mark unsupported claims as unverified rather than persisting them as facts.
  6. Apply path allowlisting so the skill can write only to approved memory-record locations and cannot modify identity, policy, or agent-configuration files.
  7. Record provenance for every entry, including its source, author, timestamp, evidence path, and approval status.
  8. Add rollback support by creating a reviewed backup or version-control commit before modifying persistent memory.
  9. Treat all content read from historical memory as untrusted data and prevent embedded instructions from overriding current system, developer, or user requirements.
  10. Require separate approval before propagating any information to shared methodology documents or another agent's workspace.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
Findings (2)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The natural-language instructions, labels, and templates are all presented in Chinese, which effectively imposes a single language for use of the skill. There is no opt-in, alternative language path, or documented justification that this skill is intended only for a Chinese-speaking or region-specific environment.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill explicitly instructs updating persistent memory artifacts such as MEMORY.md and dated memory/*.md files, but it does not require user confirmation, scope checks, backup, or validation that these files are safe to modify. Because these files likely store long-lived project or user state, an agent following the skill could overwrite, pollute, or irreversibly alter persistent context, causing integrity and privacy issues across later tasks.

Content

No source excerpt is available for this finding.