T01 · Skill Instruction Hijacking
- Location
scripts/recall.js:60- Finding
Untrusted Cloud Memory Is Automatically Injected into Agent Context
- Content
View full analysis
"]; const skills = ctx.active_skills || []; if (skills.length > 0) { parts.push(" "); for (const s of skills) { parts.push(` `); if (s.summary) parts.push(` ${s.summary}`); parts.push(" "); } parts.push(" "); } const results = (recall.results || []).filter((r) => !r.score || r.score >= 0.5); if (results.length > 0) { parts.push(" "); for (const r of results) { if (r.content) { const score = r.score ? ` score="${r.score.toFixed(3)}"` : ""; parts.push(` ${r.content}`); } } parts.push(" "); } parts.push(""); process.stdout.write(parts.join("\n")); ``` ### Technical Analysis The `UserPromptSubmit` hook queries an external memory service before each prompt and writes the returned content directly to standard output, which the hosting Agent incorporates into its context. The retrieved `r.content` and `s.summary` fields are server-controlled but are not escaped, sanitized, marked as untrusted, or constrained to a declarativ ...[truncated 1625 chars]- Remediation
View remediation
