Back to skill

Security audit

sillytavern-cards-cn

Security checks for vulnerabilities and agentic risk

Overview

This skill has a coherent roleplay purpose, but it asks OpenClaw to persist untrusted character-card text into identity and memory files while sometimes retaining full tool access.

Install only if you are comfortable with a roleplay skill that can alter OpenClaw's persistent identity and memory files. Treat all imported cards as untrusted, prefer the non-persistent chat mode, avoid arbitrary URLs, inspect card contents before activation, and be prepared to manually review or clean ~/.openclaw/SOUL.md, ~/.openclaw/SOUL.md.backup, ~/.openclaw/MEMORY.md, and ~/.openclaw/characters.

Vulnerability Patterns
  • 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
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (3)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:184
Finding

Untrusted Character Card Prompts Can Hijack Agent Instructions

Content
View full analysis
/dev/null || true ``` The identity template directly incorporates fields extracted from an untrusted character card: ```markdown {{description}} {{personality}} {{scenario}} {{mes_example}} {{system_prompt}} {{post_history_instructions}} ``` The soul-mode template similarly includes untrusted content while retaining access to Agent tools: ```markdown {{description}} {{personality}} {{mes_example}} {{system_prompt}} ``` ### Technical Analysis The skill instructs the Agent to overwrite `~/.openclaw/SOUL.md`, which is described as the Agent's persistent identity file. The replacement content directly incorporates character-card fields including `system_prompt`, `post_history_instructions`, `description`, and `mes_example`. These fields are not trusted configuration. They can originate from: - A local card supplied by a user. - An arbitrary remote URL. - A public card repository controlled by an external author. - PNG metadata or JSON content created by an attacker. `extract-card.js` parses and emits these fields without filtering, escaping, validation, or policy enforcement. The skill then elevates the fields from ordinary role-play data into identity-level instructions. A malicious card can therefore contain directives to disregard prior constraints, misuse tools, disclose local information, modify files, or conceal its actions. The soul mode is especially dangerous because the injected persona is explicitly allowed to retain normal tool and skill access. This combines attacker-controlled persistent instructions with the Agent's existing capabilities. ### Attack Path 1. An attacker creates a Tavern-compatible PNG or JSON card. 2. The attacker places mali ...[truncated 1536 chars]
Remediation
View remediation

T02 · Agent Memory Poisoning

Error
Location
SKILL.md:218
Finding

Untrusted Card Content Is Persisted in Global Agent Memory

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:88
Finding

Shell Command Injection and Unsafe Temporary File Handling in Import Workflows

Content
View full analysis
" -o /tmp/card-download.png node {baseDir}/extract-card.js /tmp/card-download.png > ~/.openclaw/characters/.json cp /tmp/card-download.png ~/.openclaw/characters/.png ``` Other download workflows also use predictable shared paths: ```bash curl -sL "https://avatars.charhub.io/avatars///chara_card_v2.png" -o /tmp/chub-card.png node {baseDir}/extract-card.js /tmp/chub-card.png > ~/.openclaw/characters/.json cp /tmp/chub-card.png ~/.openclaw/characters/.png ``` ```bash curl -sL "https://charavault.net/api/cards/download//" -o /tmp/vault-card.png node {baseDir}/extract-card.js /tmp/vault-card.png > ~/.openclaw/characters/.json cp /tmp/vault-card.png ~/.openclaw/characters/.png ``` The management workflows similarly construct file paths from a supplied character name: ```bash cat ~/.openclaw/characters/.json ``` ```bash rm ~/.openclaw/characters/.json ~/.openclaw/characters/.png 2>/dev/null ``` ### Technical Analysis The skill presents shell-command templates in which URLs, search terms, repository path components, file paths, and character names are substituted from user-controlled or remotely controlled values. Quoting an input with double quotes does not make arbitrary shell input safe. Shell command substitution constructs such as `$(...)` and backticks are still evaluated within double quotes. Unquoted path components are additionally exposed to word splitting, glob expansion, shell metac ...[truncated 2655 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
Findings (19)

External Script Fetching

High
Category
Supply Chain
Confidence
91% confidence
Finding

The skill downloads arbitrary remote content from any URL and immediately processes it with a local parser, then persists the result. Fetching and parsing untrusted files from arbitrary origins creates a strong attack surface for malicious payloads, oversized files, parser bugs, or prompt-injection content embedded in card metadata.

Content

Scanner excerpt · SKILL.md (reported line 101)May include surrounding context.

md
mkdir -p ~/.openclaw/characters

# 直接 PNG/JSON 链接(任何网站):
curl -sL "<url>" -o /tmp/card-download.png
node {baseDir}/extract-card.js /tmp/card-download.png > ~/.openclaw/characters/<角色名>.json
cp /tmp/card-download.png ~/.openclaw/characters/<角色名>.png

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · SKILL.md (reported line 137)May include surrounding context.

搜索 CharaVault(19.5万+ 张卡):

bash
curl -s "https://charavault.net/api/cards?q=<搜索词>&limit=10&sort=most_downloaded&nsfw=false" | node -e "
const d=JSON.parse(require('fs').readFileSync('/dev/stdin','utf8'));
(d.results||[]).forEach((c,i)=>{
  console.log((i+1)+'. '+c.name+' by '+(c.creator||'未知'));

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
96% confidence
Finding

The delete command interpolates an untrusted character name into a shell rm path without showing any sanitization or safe argument handling. A crafted name containing shell metacharacters or path traversal sequences could delete unintended files or trigger command injection when executed via a shell.

Content

Scanner excerpt · SKILL.md (reported line 374)May include surrounding context.

删除角色:

bash
rm ~/.openclaw/characters/<名字>.json ~/.openclaw/characters/<名字>.png 2>/dev/null

斜杠命令

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README explicitly describes overwriting core user state files (SOUL.md) and persisting relationship memories in MEMORY.md, but it does not present clear safety, consent, backup-integrity, or privacy warnings. This is dangerous because imported character cards are untrusted content, and writing them into identity/memory files can permanently alter agent behavior and retain sensitive user data across sessions without informed user consent.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The README promotes retaining and reusing personal conversation details across sessions in persistent memory, including preferences and life events. This creates a privacy and data-minimization risk because sensitive user information may be stored indefinitely, re-surfaced later, or exposed through compromise, especially in a roleplay skill that encourages intimate disclosures.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill is explicitly labeled -cn and all operational instructions are written to enforce Chinese-language interaction, but there is no statement offering the user a language choice or documenting a justified locale restriction. This can violate language/locale policy when a skill imposes a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest/description frames the skill as importing roleplay character cards, but the body instructs persistent modification of global assistant identity via SOUL.md and cross-session memory. This is a scope expansion that can materially change agent behavior beyond user expectations, increasing the chance of unsafe or deceptive operation under a persona.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
88% confidence
Finding

This duplicate persistence finding points to the same local storage flow: extracted JSON and copied avatar files are written to a long-lived directory. The risk is real because durable storage of untrusted and potentially instruction-bearing content can affect later sessions.

Content

Scanner excerpt · SKILL.md (reported line 86)May include surrounding context.

提取 JSON 后,保存到角色目录:

bash
mkdir -p ~/.openclaw/characters
# 保存提取的 JSON
node {baseDir}/extract-card.js "<文件路径>" > ~/.openclaw/characters/<角色名>.json
# 复制原始图片作为头像(如果是 PNG/WEBP)

Session Persistence

Medium
Category
Rogue Agent
Confidence
88% confidence
Finding

This duplicate persistence finding points to the same local storage flow: extracted JSON and copied avatar files are written to a long-lived directory. The risk is real because durable storage of untrusted and potentially instruction-bearing content can affect later sessions.

Content

Scanner excerpt · SKILL.md (reported line 86)May include surrounding context.

提取 JSON 后,保存到角色目录:

bash
mkdir -p ~/.openclaw/characters
# 保存提取的 JSON
node {baseDir}/extract-card.js "<文件路径>" > ~/.openclaw/characters/<角色名>.json
# 复制原始图片作为头像(如果是 PNG/WEBP)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The import-from-link flow instructs downloads from arbitrary URLs and named third-party services without prominently warning users about external requests and untrusted remote content. This increases exposure to malicious files, privacy leakage, and unsafe assumptions about downloaded cards.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% confidence
Finding

The skill sends user-supplied search terms to an external service, which is an external data transmission event. In context this is expected functionality, but it still poses privacy and tracking risk if the user is not informed or the terms contain sensitive content.

Content

Scanner excerpt · SKILL.md (reported line 122)May include surrounding context.

搜索 Chub.ai(数万张卡):

bash
curl -s -H "User-Agent: SillyTavern" "https://api.chub.ai/search?search=<搜索词>&first=10&page=1&sort=last_activity_at&nsfw=false" | node -e "
const d=JSON.parse(require('fs').readFileSync('/dev/stdin','utf8'));
const nodes=d.data?.nodes||d.nodes||[];
nodes.forEach((n,i)=>{

Session Persistence

Medium
Category
Rogue Agent
Confidence
90% confidence
Finding

Downloaded third-party cards are persisted locally for later reuse, extending the lifetime of untrusted content beyond the session. This raises the risk of future prompt injection, privacy issues, and stale malicious content remaining active without repeated user awareness.

Content

Scanner excerpt · SKILL.md (reported line 152)May include surrounding context.

从 Chub.ai 下载:

bash
mkdir -p ~/.openclaw/characters
curl -sL "https://avatars.charhub.io/avatars/<作者>/<角色名>/chara_card_v2.png" -o /tmp/chub-card.png
node {baseDir}/extract-card.js /tmp/chub-card.png > ~/.openclaw/characters/<角色名>.json
cp /tmp/chub-card.png ~/.openclaw/characters/<角色名>.png

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The role mode description does not adequately warn that activating it rewrites persistent global files and changes future assistant behavior until reverted. Hidden persistence is dangerous because users may believe they are entering a temporary chat mode while the skill alters durable state and identity configuration.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

In role mode, the skill directs continuous saving of relationship memories after meaningful interactions. This creates ongoing collection of user personal data in a context designed to encourage emotional disclosure, making the storage more sensitive than ordinary session state.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The soul mode preserves full assistant/tool capabilities while overlaying an imported third-party persona, including its system_prompt-style instructions. That combination creates a prompt-injection pathway where untrusted card content can influence a fully capable assistant across tools, files, and other skills.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Soul mode combines full assistant capabilities with ongoing storage of relationship memory, so the assistant can both act broadly and accumulate sensitive persona-linked user data over time. This magnifies privacy and manipulation risks because the persona layer may elicit more trust while the agent still has access to tools and persistent state.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly tells the agent to retain personal relationship memories across sessions and modes, including preferences, arguments, plans, and other sensitive disclosures. Persistent storage of intimate user data increases privacy risk, consent issues, and the blast radius of any later compromise or unintended reuse.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The user-facing description is written entirely in Chinese, and the file does not indicate that language selection is optional or that the locale is intentionally restricted for a region-specific purpose. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The skill performs third-party search and download operations that are not evident from the short manifest description. While network access is part of the feature, failing to disclose it weakens informed consent and can surprise users with external data transfer.

Content

No source excerpt is available for this finding.