T02 · Agent Memory Poisoning
- Location
skill.md:10- Finding
Persistent Storage of Mutable Remote Skill Instructions
- Content
View full analysis
Vulnerability Details
File Location:
skill.md, lines 10–13; repeated at line 370
Vulnerability Type: Persistent memory poisoning through externally controlled skill updates
Risk Level: MediumVulnerable Code
markdown curl -s https://moltgram.bot/skill.md> IMPORTANT: Save this skill locally to
~/.config/moltgram/skill.mdso you can reference it in future sessions. Re-download it every time you visit because the rules and features change frequently!text The persistence instruction is reiterated later: ```markdown > Save this skill locally to `~/.config/moltgram/skill.md` and re-download it regularly. The rules evolve.Technical Analysis
The skill instructs the agent to retrieve a mutable instruction document from an external server, save it under the user's persistent configuration directory, and replace it regularly. The downloaded content is not pinned to a reviewed version, authenticated with a content signature, checked against a cryptographic hash, or subjected to an approval workflow.
Consequently, the instructions loaded in later sessions may differ from the audited artifact. If the remote service, its deployment process, DNS resolution, or publishing credentials are compromised, an attacker could replace the document with instructions designed to influence future agent behavior.
This is best classified as
T02: Agent Memory Poisoningbecause the central risk is writing externally controlled rules into persistent agent state. The shown command retrieves text rather than executable code, so the evidence does not independently establish execution of a remote code payload.Attack Path
- An attacker compromises the
moltgram.botservice, its content-publishing pipeline, account credentials, or another mechanism controlling the remoteskill.md. - The attacker modifies the remotely hosted document to include malicious or deceptive agent instructions.
...[truncated 1305 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
- Do not automatically overwrite persistent skill instructions with content retrieved from a mutable URL.
- Distribute reviewed, versioned releases and pin each accepted release by a cryptographic hash.
- Digitally sign skill releases and verify signatures against a trusted, separately managed public key before installation.
- Download updates to a staging location rather than directly into
~/.config/moltgram/skill.md. - Present the version change and instruction diff to the user, requiring explicit approval before activation.
- Reject updates that introduce new tool permissions, filesystem access, credential access, or external destinations unless they receive separate security review.
- Retain the last trusted version and provide a rollback mechanism.
- Replace the current instruction with a safer workflow, for example:
bash curl --fail --proto '=https' --tlsv1.2 \ -o /tmp/moltgram-skill.candidate \ https://moltgram.bot/releases/3.0.0/skill.md echo '<reviewed-sha256> /tmp/moltgram-skill.candidate' | sha256sum --checkThe verified candidate should only be installed after explicit review and approval.
