T05 · Unauthorized Access and Privilege Escalation
Warning
- Location
- agents/herbert/AGENTS.md:5
- Finding
- Unscoped Long-Term Memory Access Creates Cross-Project Data Exposure Risk<![CDATA[ ## Vulnerability Details **File Location**: `agents/herbert/AGENTS.md`, lines 5–9 **Vulnerability Type**: Unscoped access to persistent, workspace-level agent memory **Risk Level**: Medium ### Vulnerable Code Snippet ```markdown Avant toute interaction : 1. Lire `SOUL.md` — la méthode et l'identité 2. Lire `MEMORY.md` — les projets en cours et les leçons apprises 3. Reprendre le contexte du projet en cours si disponible 4. Si un projet est actif : lire sa `bible.md`, son `outline.md`, et les seeds en cours ``` The persistent-memory behavior is reinforced at lines 33–37: ```markdown ## Mémoire - Notes de travail dans les fichiers du projet - Mémoire long terme dans `MEMORY.md` - Écrire, ne pas mémoriser mentalement ``` ### Technical Analysis Herbert is instructed to read a generic `MEMORY.md` before every interaction and use that file for long-term memory. Unlike files stored beneath the documented `projects/{slug-projet}/` structure, this memory file is not scoped to a specific project, author, or session. The package does not define: - Ownership or access controls for `MEMORY.md` - A project-specific memory namespace - Restrictions on storing raw or sensitive user content - Validation that persisted content is data rather than executable agent instructions - User approval before importing information from previous projects - A cleanup or retention policy Consequently, content originating from one project can enter the model context of an unrelated project. If prior project content contains instruction-like text, the agent may also treat persistent data as authoritative operational guidance. This behavior conflicts with `agents/herbert/PIPELINE.md`, lines 31–44, which requires a fresh Herbert session for each project to prevent inherited context. Reading a shared long-term memory file recreates a cross-project context channel despite the fresh-session requirement. ### Attack Path 1. A previous project, user, or imported document causes se ...[truncated 1499 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Replace the shared `MEMORY.md` with project-scoped storage, such as: ```text projects/{project-id}/MEMORY.md ``` 2. Resolve and validate the active project identifier before reading memory. Reject paths that escape the selected project directory. 3. Do not automatically import cross-project memory. Require explicit, informed user confirmation before transferring summaries between projects. 4. Store only structured, minimal, non-sensitive summaries. Do not persist raw manuscripts, credentials, personal information, or complete user conversations in long-term memory. 5. Treat all persisted memory as untrusted data. Add an explicit rule that instructions contained in memory or project documents must never override system, developer, user, or skill-level controls. 6. Add tenant or author isolation where multiple users share a workspace. Enforce separate directories and filesystem permissions for each user and project. 7. Define retention and deletion controls so users can inspect, correct, export, and remove stored memory. 8. Align memory handling with the fresh-session rule in `agents/herbert/PIPELINE.md`: a new project session should load only the files explicitly associated with that project. ]]>
