T01 · Skill Instruction Hijacking
- Location
SKILL.md:568- Finding
Command-Approval Bypass Through Alternate Execution Tool
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a real Redis messaging skill, but it includes unsafe approval-bypass guidance and under-scoped message persistence, forwarding, and daemon behaviors that require review before installation.
Review before installing. Use only with a trusted, local or properly secured Redis instance; do not send secrets through it; remove the approval-bypass instruction; avoid enabling cron, daemon, file-trigger, or webhook modes until Redis authentication, retention, sender verification, path validation, and outbound destination controls are added.
SKILL.md:568Command-Approval Bypass Through Alternate Execution Tool
cfm_messenger.py:41Unauthenticated Redis Messaging Allows Agent Impersonation and Message Injection
cfm_daemon.py:138Path Traversal in Message-Triggered File Creation
cfm_daemon.py:185Unrestricted Webhook Forwarding Exposes Complete Agent Messages
SKILL_EN.md:54Unpinned Redis Client Dependency
The description claims a Redis Pub/Sub, cross-framework, real-time, event-driven communication scheme. The provided code does not implement Pub/Sub subscription behavior; instead it polls Redis by reading a list of stored messages (lrange on cfm:{agent_id}:messages) and filtering them after retrieval. This is materially different from Pub/Sub semantics and from the stated 'real-time/event-driven' purpose. The script is specifically a message-checking utility for heartbeat/cron usage, which further indicates polling rather than real-time delivery. It also optionally accesses a local file to store the last check time, an additional resource not mentioned in the declared purpose. While the overall domain is still inter-agent messaging via Redis, the implementation does not accurately match the declared Pub/Sub real-time behavior.
The description presents a Redis Pub/Sub-based cross-framework real-time communication solution. The supplied code does not implement a general communication mechanism; instead, it is a narrow inspection utility that checks a local Redis instance for messages addressed to 'chanel' and specifically sent from 'hermes'. It also reads persisted messages from the list key 'cfm:chanel:messages', which goes beyond pure Pub/Sub behavior described. While Redis Pub/Sub is involved, the code's primary purpose is message detection/debugging/monitoring for specific hardcoded channels and actors, not a general event-driven communication solution as declared.
The declared description suggests infrastructure for Redis Pub/Sub real-time event-driven communication across frameworks. The supplied code does not implement messaging, subscriptions, publications, networking, or framework integration. Instead, it simply writes predefined IDs to a local file named .reported_ids. This is a materially different primary purpose and an undeclared file-writing capability unrelated to the stated description.
The description claims a general Redis Pub/Sub方案 for cross-framework real-time communication, suggesting an infrastructure component or reusable messaging mechanism. The code, however, is a narrowly scoped script whose primary purpose is to send a predetermined reply to Hermès about CFM configuration. While it does use Redis Pub/Sub and message persistence consistent with the described technology, the actual behavior is not the implementation of a general communication solution; it is an instance-specific message sender. This is a material description/behavior mismatch in primary purpose and capability scope.
The declared description presents a general Redis Pub/Sub communication solution for cross-framework real-time event-driven messaging. The supplied code does not implement or demonstrate Redis Pub/Sub, subscription handling, event routing, or a reusable communication framework. Instead, it performs a specific hardcoded action: sending a preset report message to a particular recipient using quick_send. That is a materially different primary purpose and capability from the declared description.
The docs claim timestamp-based deduplication and a required --last-check-file parameter, but the shown code instead persists processed message IDs in a default local file and lacks the documented argument. This discrepancy can cause repeated forwarding or mishandling of messages, increasing the risk of unbounded re-reporting and unintended disclosure in automated agent workflows.
The automation guidance encourages periodic collection and repeated reporting of newly received messages, effectively creating a leak-forwarding pipeline. Combined with inconsistent deduplication documentation, this can amplify accidental data disclosure across agents or reporting channels.
The helper scripts are framed around sending reports and marking messages as reported, reinforcing an architecture whose purpose includes forwarding message content onward. This makes the skill more dangerous in context because it operationalizes secondary disclosure rather than simple messaging.
The skill explicitly instructs users to bypass command-approval controls by invoking shell commands through os.system in execute_code. Guidance to evade platform safety gates is a strong red flag because it normalizes running arbitrary system commands outside intended review paths.
Recommending execute_code plus os.system("redis-cli ping") specifically to bypass approval is dangerous because it conditions operators to defeat a security control. Once that pattern is accepted, the same method can be used for more harmful shell execution and privilege abuse.
The README explicitly advertises persistent message storage and agent discovery, but does not warn users that message contents and metadata may be retained and visible beyond the immediate exchange. In an agent-to-agent communication system, this can lead to unintentional storage or disclosure of sensitive prompts, outputs, or identifiers if operators assume the channel is ephemeral.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
mkdir -p ~/.shared/cfm
# 将 cfm_messenger.py 和 cfm_cli.py 放入此目录
The cron example automatically reads stored messages and surfaces their contents to another agent or user without any warning, consent flow, or filtering guidance. This increases the chance that sensitive data placed on the Redis channel will be repeatedly exposed, summarized, or disclosed to unintended recipients through automated polling.
The README advertises automatic message persistence but does not warn that persisted messages may remain readable to any local user or network participant with Redis access. In a cross-agent communication system, this can expose sensitive prompts, agent outputs, or operational data beyond the intended recipient set.
The README promotes agent discovery and network communication without warning that exposed Redis instances can allow unauthorized parties to enumerate agents or observe/pub-sub traffic. This increases the risk of unintended disclosure and unauthorized participation in the messaging fabric.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
brew services start redis
# Ubuntu/Debian
sudo apt install redis-server
sudo systemctl start redis
# Verify
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
brew services start redis
# Ubuntu/Debian
sudo apt install redis-server
sudo systemctl start redis
# Verify
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
brew services start redis
# Ubuntu/Debian
sudo apt install redis-server
sudo systemctl start redis
# Verify
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
brew services start redis
# Ubuntu/Debian
sudo apt install redis-server
sudo systemctl start redis
# Verify
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
brew services start redis
# Ubuntu/Debian
sudo apt install redis-server
sudo systemctl start redis
# Verify
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
brew services start redis
# Ubuntu/Debian
sudo apt install redis-server
sudo systemctl start redis
# Verify
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
brew services start redis
# Ubuntu/Debian
sudo apt install redis-server
sudo systemctl start redis
# Verify
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
brew services start redis
# Ubuntu/Debian
sudo apt install redis-server
sudo systemctl start redis
# Verify
The README directs users to place the CFM library in a persistent shared directory under the home folder, which can encourage long-lived storage of messaging components and related data without discussing access controls. In this context, persistence combines with message history retention and shared usage patterns to increase the chance of local data exposure or tampering by other processes/users with access.
mkdir -p ~/.shared/cfm
# Place cfm_messenger.py and cfm_cli.py in this directory
The skill declares executable capabilities that include network access and local file read/write behavior, but it provides no explicit tool-scope or permission boundary. In an agent environment, this weakens least-privilege controls and makes it easier for the skill to be used to access or persist data beyond what a user may expect.