T02 · Agent Memory Poisoning
- Location
SKILL.md:50- Finding
Untrusted Analysis Can Poison Persistent Project Context
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 50-53
Vulnerability Type: Persistent memory poisoning
Risk Level: MediumVulnerable Code Snippet:
markdown ### Step 5: Knowledge Persistence - Store analysis results and project understanding in `resources/project-understanding.md` - Update accumulated knowledge for future risk assessments - Maintain historical context of requirement interpretations and codebase evolutionTechnical Analysis
The skill instructs the agent to persist analysis results and requirement interpretations in
resources/project-understanding.mdfor use in future assessments. Requirement documents, repository content, and related analysis inputs may be attacker-controlled. The persistence workflow does not require source provenance, validation, explicit user approval, trust classification, or separation of verified facts from untrusted claims.Consequently, false architectural assertions, misleading security assumptions, or instruction-like text derived from an untrusted input could be written into persistent project context. Future audits may then treat that content as trusted background information. This crosses a session boundary and is therefore best classified as agent memory poisoning rather than ordinary prompt injection.
Attack Path
- An attacker supplies a crafted requirement document or repository artifact containing false architectural claims, misleading security assumptions, or instruction-like content.
- The skill analyzes that content as part of its normal requirement-driven workflow.
- Following Step 5, the agent writes the resulting interpretation into
resources/project-understanding.md. - A later audit loads or relies on the persisted project understanding.
- The poisoned context influences subsequent reviews, potentially causing risks to be omitted, incorrectly downgraded, or assessed using attacker-selected assumptions.
Impac
...[truncated 616 chars]
- Remediation
View remediation
Remediation Suggestions
- Require explicit user approval before writing any analysis-derived information to persistent project context.
- Record provenance for every persisted claim, including its source file, timestamp, repository revision, and verification status.
- Separate verified technical facts from untrusted requirements, hypotheses, and model-generated interpretations.
- Never promote instruction-like text from requirements or repository files into operational agent rules.
- Store persistent context separately for each repository and prevent one project's content from influencing another project.
- Validate proposed context changes against inspected source code before persistence.
- Present a reviewable diff before modifying
resources/project-understanding.md. - Support revocation and correction of previously stored claims, and prefer append-only provenance records over silently replacing trusted context.
