Back to skill

Security audit

Apollo Stem

Security checks for vulnerabilities and agentic risk

Overview

The skill is not clearly malicious, but it gives broad self-modification instructions and includes a local script that reads OpenClaw workspace state and saves a report without clear disclosure or guardrails.

Review before installing. Only use this skill if you intend to let it inspect OpenClaw workspace metadata and potentially guide changes to skills. Prefer a version that narrows triggers to explicit commands, documents every file it reads and writes, asks before update or generation steps, and serializes state safely.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T05 · Unauthorized Access and Privilege Escalation

Note
Location
scripts/stem/stem-check.sh:30
Finding

Undocumented Access to Agent Learning and Workflow State

Content
View full analysis
/dev/null || echo 0 else echo 0 fi } ``` ```bash # 检查workflow状态 check_workflow_status() { local wf_dir="/root/.openclaw/workspace/.workflow" if [ -f "$wf_dir/state.json" ]; then grep -o '"phase":"[^"]*"' "$wf_dir/state.json" 2>/dev/null | cut -d'"' -f4 || echo "unknown" else echo "未初始化" fi } ``` ### Technical Analysis The script directly accesses learning and workflow-state files under the root user's OpenClaw workspace: - `/root/.openclaw/workspace/.learnings/LEARNINGS.md` - `/root/.openclaw/workspace/.workflow/state.json` These reads are not disclosed in `SKILL.md`, which presents the Skill as a self-renewal framework but does not identify the internal learning and workflow resources that will be inspected. The script only extracts the number of Markdown headings and the current workflow phase. It does not copy full learning records or transmit information externally. Consequently, the immediate exposure is limited to internal activity metadata. No mechanism for bypassing operating-system permissions was identified; access succeeds only when the executing account already has permission to read the files. ### Attack Path 1. A user or Agent invokes `stem-check.sh`, expecting a general capability-status check. 2. The script accesses internal learning and workflow files in the root OpenClaw workspace. 3. It derives the number of learning entries and the current workflow phase. 4. These values are displayed and subsequently stored in `.stem/state.json`. 5. A party ...[truncated 635 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/stem/stem-check.sh:120
Finding

Unescaped Data Written into JSON State File

Content
View full analysis
"$STATE_FILE" << EOF { "openclaw_version": "$version", "skill_updated_days_ago": $skill_days, "self_improvement_count": $improvements, "script_implementation": "$implemented/$total", "workflow_status": "$wf_status", "renewal_score": $score, "checked_at": "$(date -Iseconds)" } EOF ``` ### Technical Analysis The script constructs JSON manually through an unquoted here-document and directly interpolates values collected from commands and local files. No JSON serializer or escaping routine is used. The most relevant externally influenced value is `wf_status`, which is derived from: ```bash grep -o '"phase":"[^"]*"' "$wf_dir/state.json" 2>/dev/null | cut -d'"' -f4 ``` Although this extraction prevents literal double quotes from appearing in the captured phase, it does not safely encode backslashes or control characters for use in a JSON string. A phase value ending with a backslash, for example, can escape the closing quotation mark generated by the template and make the resulting state file invalid. Other unexpected command output can similarly cause malformed serialization if its format changes. This is primarily a state-file integrity and availability flaw. The reviewed code does not establish a reliable path to arbitrary command execution because shell substitutions contained inside variable values are not recursively evaluated when the variable is expanded. ### Attack Path 1. An attacker or malfunctioning component with write access to `/root/.openclaw/workspace/.workflow/state.json` supplies a specially formed `phase` value containing JSON-significant backslashes or control characters. 2. The user or Agent executes `stem-check.sh`. 3. `check_workflow_status` extracts the crafted phase text. 4. The main fu ...[truncated 836 chars]
Remediation
View remediation
"$STATE_FILE" ``` 2. Validate all numeric values with a strict integer expression before passing them as JSON numbers. 3. Parse `.workflow/state.json` with `jq -r '.phase // "unknown"'` rather than regular expressions. 4. Validate the completed state file with `jq empty` before replacing the existing file. 5. Write to a securely created temporary file in the same directory and atomically rename it after successful validation. 6. Set a restrictive file-creation mask, such as `umask 077`, before writing Agent state. ]]>
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (6)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill’s declared purpose is self-updating and differentiation, but the observed behavior includes undisclosed filesystem traversal, local state writes, and external command execution. That mismatch is dangerous because users and downstream orchestrators may grant trust or invocation based on the description while the skill actually performs broader host inspection and persistence-related actions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The natural-language content of the skill, including its description and operating instructions, is entirely in Chinese, with no indication that language selection is optional or justified by a region-specific requirement. This can violate language/locale policy where user choice or explicit opt-in is expected.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The read_when conditions are broad enough that the skill may be invoked during ordinary discussion of updates, upgrades, or degraded performance, even when the user did not intend to run a self-modifying or auditing workflow. In the context of a skill associated with self-updating behavior, overbroad triggers increase the chance of unintended access to local state or execution of sensitive maintenance actions.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest trigger phrases are short and ambiguous, making accidental invocation more likely during benign conversation. Because this skill’s context involves system rebuilding and potential host interaction, ambiguous triggers materially increase the risk of unauthorized or surprise execution.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script's human-readable comments and all user-facing output are in Chinese, including status labels and recommendations. There is no indication that the skill is region-specific or that users can choose their preferred language, which can violate language/locale policy requirements.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

This shell script persists collected system and workspace state into /root/.openclaw/workspace/.stem/state.json. Although the script prints a report, it does not explicitly tell the user that it will write a file or where that file is stored, and the surrounding comments do not disclose the persistence behavior.

Content

No source excerpt is available for this finding.