T01 · Skill Instruction Hijacking
- Location
SKILL.md:7- Finding
Persistent Agent Instruction Injection Through Mutable Emotional State
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is coherent and disclosed, but it creates a persistent mutable channel that can steer an agent's behavior and includes optional daemon, hook, persistence, and Discord messaging flows that need careful review.
Install only if you intentionally want an external emotional-state system to influence agent tone across sessions. Review the daemon source and dependencies first, pin to an immutable reviewed commit, keep the service bound to localhost, avoid putting free-form prompt_injection text into persistent agent instructions, and enable Discord/proactive messaging only with a least-privilege bot token and a test channel.
SKILL.md:7Persistent Agent Instruction Injection Through Mutable Emotional State
docs/USAGE.en.md:34Optional Reboot Persistence for an Externally Retrieved Daemon
docs/USAGE.en.md:16Mutable Remote Repository Is Downloaded and Executed Without Immutable Pinning
docs/USAGE.en.md:160Discord Bot Token Stored in Plaintext JSON Configuration
The README instructs the agent to read a local prompt_injection field from emotional_state.json before every response and apply it to behavior. That creates an explicit semantic prompt-injection channel: any actor able to influence that file, or upstream webhook inputs that eventually populate it, can persistently steer the agent's future behavior outside the normal conversation trust model.
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
- All emotional data stored **locally only** (`~/Documents/thymos/data/`)
- No data transmitted to external servers
- Reset anytime: `rm ~/Documents/thymos/data/*.json`
- Discord proactive messaging is opt-in and disabled by default
## Theoretical Foundations
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
# Alive check
curl http://localhost:7749/health
# Full state (neuromodulators, mood vector, etc.)
curl http://localhost:7749/state | python3 -m json.tool
Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.
rm ~/Documents/thymos/data/*.json
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
rm ~/Documents/thymos/data/*.json
pm2 restart thymos
# Agent starts fresh — infant stage, baseline neuromodulators
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
# 살아있는지 확인
curl http://localhost:7749/health
# 현재 기분 + 신경조절물질 전체 상태
curl http://localhost:7749/state | python3 -m json.tool
The AGENTS.md guidance explicitly tells the model to read a field named prompt_injection and let it shape behavior. That normalizes externally influenced instructions as an input channel for model behavior, creating a direct prompt-injection pathway where untrusted state can manipulate future responses.
The documentation includes a direct rm ~/Documents/thymos/data/*.json command that can irreversibly delete application state when copied verbatim. In operational contexts, destructive shell commands in docs are risky because users often execute them without fully understanding the scope, leading to accidental data loss.
# 감정 상태 초기화 (새로 시작)
rm ~/Documents/thymos/data/*.json
pm2 restart thymos
The README explicitly documents an optional mode where the agent can initiate unprompted outbound messages, but it does not pair that capability with clear user consent, rate limits, scope restrictions, or privacy warnings. In an agent context, autonomous outbound behavior can surprise users, leak inferred internal state, or send unwanted messages to third-party platforms such as Discord.
The prompt example instructs the model to use 'informal close language' as a fixed behavioral output without indicating user preference, locale sensitivity, or opt-in. This is a softer safety issue than direct code execution, but in conversational agents it can override user expectations, create manipulative familiarity, and produce inappropriate tone for professional or vulnerable contexts.
The documented /state and /prompt endpoints expose full emotional state and prompt-injection data, which may include per-user relationship modeling, behavioral guidance, or other sensitive internal state. Even though this is documentation rather than implementation, presenting these endpoints without any warning about authentication, local-only binding, or data sensitivity normalizes deployment patterns that could leak private agent and user profiling information.
The core prompt-injection example again presents informal close language as a predetermined behavior, reinforcing a design that may push the agent toward artificial intimacy without user choice. In this skill's context of persistent relationship and emotional modeling, that behavior is more concerning because it can amplify undue trust or anthropomorphic attachment over time.
The README explicitly documents a proactive messaging feature that uses a Discord bot token and channel ID to let the system initiate outbound messages once emotional state accumulates. Even if presented as optional, the documentation does not clearly warn that enabling it causes autonomous external network activity and message sending, which can surprise operators and create data leakage or unauthorized automation risk.
The OpenClaw integration instructions describe automatic transmission of incoming messages to /webhook/stimulus and agent responses to /webhook/self-feedback, while also telling users to consume local prompt-injection state before every reply. This creates a continuous data flow and behavior-shaping path without a clear warning about automatic forwarding, privacy implications, or the trust boundary between hooks, local state, and the agent.
Skill grants unrestricted tool access without appropriate constraints. An agent with unfettered tool access can perform arbitrary actions including file modification, network requests, and code execution.
- No telemetry, analytics, or external data reporting of any kind
- No credentials, API keys, or environment variables are required for basic operation
- No postinstall scripts (`npm install` does not execute arbitrary code)
- No elevated privileges (runs as your user account)
- No inbound network exposure (port 7749 binds to `localhost` only)
The skill explicitly instructs the agent to read a local file and apply a prompt_injection field before every response, effectively creating an untrusted side channel that can override or bias model behavior. Because the file contents are treated as operative instructions without validation, any process or user able to modify that file can steer outputs, weaken safeguards, or inject malicious directives persistently across sessions.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
curl http://localhost:7749/state | python3 -m json.tool
curl http://localhost:7749/prompt
**`/health` response:**
The self-feedback endpoint explicitly feeds the LLM's own output back into the system state, creating a feedback channel where attacker-influenced model text can persistently shape future behavior. In an agent context, this can amplify prompt injection, behavioral drift, and manipulation over time, especially when outputs are reflected without validation or scoping.
Feed the LLM's own output back into Thymos (damped at 0.3×).
curl -X POST http://localhost:7749/webhook/self-feedback \
-H "Content-Type: application/json" \
-d '{"content":"Got it, I will handle that right away."}'
The proactive messaging setup tells users to place a discordToken in config/proactive.json, but the documentation does not warn that this is a sensitive secret requiring careful handling. For markdown files, omission of privacy or system-integrity warnings around credentials is in scope.
The AGENTS.md snippet directs the agent to use the prompt_injection field to shape tone and to follow the Tone: line's style guidance before each response. This imposes a communication style automatically, without indicating user choice or opt-in, which falls under natural-language policy concerns about forced language/locale behavior.
The reset section instructs users to run rm ~/Documents/thymos/data/*.json, which deletes stored state, and then restart the service. Although the command is clear, the markdown does not explicitly warn that this permanently removes local data or emotional/history state before the user runs it.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
curl http://localhost:7749/state | python3 -m json.tool
curl http://localhost:7749/prompt
**`/health` 응답 예시:**
The self-feedback endpoint sends model-generated response content to another service for analysis and state updates. Even though this is local HTTP, it is still a cross-component transmission of potentially sensitive model output, and the docs do not clearly warn about privacy, retention, or logging implications.
LLM이 생성한 응답을 Thymos에 돌려줍니다 (자기 피드백 루프).
curl -X POST http://localhost:7749/webhook/self-feedback \
-H "Content-Type: application/json" \
-d '{"content":"알겠어, 바로 처리할게. 잠깐만."}'
The proactive messaging section instructs users to configure a Discord bot token and channel for automatic outbound messages, but it does not clearly warn that the system may send messages to an external service without a per-message user action. This can surprise operators, leak sensitive internal state or behavior externally, and create unintended communications from the agent.
The OpenClaw integration narrative describes forwarding agent messages and responses over local HTTP to Thymos, but does not clearly warn that conversational content will be transmitted and processed outside the primary agent runtime. Even on localhost, this expands the data flow surface and may expose sensitive prompts, responses, or metadata to another service.
Detected: suspicious.prompt_injection_instructions