Back to skill

Security audit

Citrea Claw Skill

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to be a real Citrea monitoring tool, but it needs review because it directs agents to run shell commands with user-provided arguments and stores Telegram credentials in plaintext.

Install only if you are comfortable with an agent running local Node commands, using Citrea RPC, and optionally sending alerts through Telegram. Review or pin the source before any git clone/npm install step, avoid pasting bot tokens into chat when possible, store secrets with restrictive permissions, and validate or quote all user-provided command arguments before execution.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:86
Finding

Shell Command Injection Through Unquoted User-Controlled Arguments

Content
View full analysis
``` Example: user says "check arb for wcBTC and USDC" → run: ```bash cd ~/.openclaw/skills/citrea-claw-skill && node index.js arb:check wcBTC USDC.e ``` ``` The same unsafe construction pattern appears in other command templates, including `price`, `pool:price`, `pool:liquidity`, `balance`, and `txns`. ### Technical Analysis The Skill instructs the agent to build shell command strings by inserting token symbols, addresses, or other values derived from user messages. These arguments are not quoted or validated before being placed into commands executed through the `exec` tool. Although the JavaScript command handlers perform some validation, that validation occurs only after the shell has parsed the command line. Shell metacharacters such as command separators, substitutions, pipes, or redirections can therefore be interpreted before `index.js` receives its arguments. The issue exceeds the minimum privileges required by the declared functionality. Reading public Citrea data requires only launching Node.js with fixed command names and validated data arguments; it does not require passing user-controlled text through a command shell. ### Attack Path 1. A user invokes a supported Skill trigger and supplies a malicious token or address argument containing shell syntax. 2. The agent follows `SKILL.md` and interpolates that value into the documented command string. 3. The `exec` tool invokes the command through a shell. 4. The shell interprets the injected syntax independently of the intended `node index.js` command. 5. The injected command runs with the ...[truncated 752 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:33
Finding

Telegram Bot Token Collected Through Chat and Stored in a Plaintext Environment File

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
src/lib/telegram.js:11
Finding

Telegram Bot Credential Embedded in the HTTP Request URL

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
Findings (47)

YARA rule 'agent_skill_credential_exfiltration_webhook': AI agent skill credential harvesting followed by webhook or external exfiltration [agent_skills]

Critical
Category
YARA Match
Confidence
85% confidence
Finding

YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Content

Scanner excerpt · src/lib/telegram.js (reported line 2)May include surrounding context.

js
export async function sendTelegram(message) {
  const token  = process.env.TELEGRAM_BOT_TOKEN
  const chatId = process.env.TELEGRAM_CHAT_ID

  if (!token || !chatId) {
    console.warn('⚠️  Telegram not configured — set TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID in .env')
    return
  }

  try {
    const res = await fetch(`https://api.telegram.org/bot${token}/sendMessage`, {
      method:  'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        chat_id:    chatId,
        text:       message,
        parse_mode: 'HTML',
      }),
    })

    if (!res.ok) {
      const err = await res.text()
      console.err

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 45)May include surrounding context.

cd ~/.openclaw/skills/citrea-claw-skill npm install cp .env.example .env

edit .env with your Telegram bot token and chat ID

text

Restart your OpenClaw gateway and start a new session with your agent. Then ask:

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 59)May include surrounding context.

cd ~/.openclaw/skills/citrea-claw-skill npm install cp .env.example .env

edit .env with your Telegram bot token and chat ID

text

Restart your OpenClaw gateway and start a new session with your agent. Then ask:

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

cd ~/.openclaw/skills/citrea-claw-skill npm install cp .env.example .env

edit .env with your Telegram bot token and chat ID

text

Restart your OpenClaw gateway and start a new session with your agent. Then ask:

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 44)May include surrounding context.

git clone https://github.com/jason-chew/citrea-claw-skill.git ~/.openclaw/skills/citrea-claw-skill cd ~/.openclaw/skills/citrea-claw-skill npm install cp .env.example .env

text

> **Important:** The repo must be cloned into `~/.openclaw/skills/citrea-claw-skill/` for your OpenClaw agent to find and execute commands. Cloning anywhere else will result in the skill not working.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 58)May include surrounding context.

git clone https://github.com/jason-chew/citrea-claw-skill.git ~/.openclaw/skills/citrea-claw-skill cd ~/.openclaw/skills/citrea-claw-skill npm install cp .env.example .env

text

> **Important:** The repo must be cloned into `~/.openclaw/skills/citrea-claw-skill/` for your OpenClaw agent to find and execute commands. Cloning anywhere else will result in the skill not working.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SETUP.md (reported line 19)May include surrounding context.

git clone https://github.com/jason-chew/citrea-claw-skill.git ~/.openclaw/skills/citrea-claw-skill cd ~/.openclaw/skills/citrea-claw-skill npm install cp .env.example .env

text

> **Important:** The repo must be cloned into `~/.openclaw/skills/citrea-claw-skill/` for your OpenClaw agent to find and execute commands. Cloning anywhere else will result in the skill not working.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SETUP.md (reported line 48)May include surrounding context.

git clone https://github.com/jason-chew/citrea-claw-skill.git ~/.openclaw/skills/citrea-claw-skill cd ~/.openclaw/skills/citrea-claw-skill npm install cp .env.example .env

text

> **Important:** The repo must be cloned into `~/.openclaw/skills/citrea-claw-skill/` for your OpenClaw agent to find and execute commands. Cloning anywhere else will result in the skill not working.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

A Telegram connectivity test and alerting workflow are not the same as Citrea monitoring, yet they are embedded in the same skill instructions. This broadens the skill's effective scope into external communications and secret handling, which is especially risky when the stated purpose does not prepare reviewers for that behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

A Telegram connectivity test and alerting workflow are not the same as Citrea monitoring, yet they are embedded in the same skill instructions. This broadens the skill's effective scope into external communications and secret handling, which is especially risky when the stated purpose does not prepare reviewers for that behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

A Telegram connectivity test and alerting workflow are not the same as Citrea monitoring, yet they are embedded in the same skill instructions. This broadens the skill's effective scope into external communications and secret handling, which is especially risky when the stated purpose does not prepare reviewers for that behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

A Telegram connectivity test and alerting workflow are not the same as Citrea monitoring, yet they are embedded in the same skill instructions. This broadens the skill's effective scope into external communications and secret handling, which is especially risky when the stated purpose does not prepare reviewers for that behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

A Telegram connectivity test and alerting workflow are not the same as Citrea monitoring, yet they are embedded in the same skill instructions. This broadens the skill's effective scope into external communications and secret handling, which is especially risky when the stated purpose does not prepare reviewers for that behavior.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill authorizes cloning code from GitHub and running npm install, which introduces direct supply-chain risk and arbitrary code execution potential. In an agent setting, this is particularly dangerous because dependency installation may run lifecycle scripts and pull in unreviewed packages without strong user scrutiny.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
89% confidence
Finding

The setup flow explicitly creates a .env file and then instructs the agent to populate it with credentials, which constitutes credential collection and local storage. Even if intended for configuration, this is dangerous because it normalizes acquiring reusable secrets through the skill and storing them in a location other tools or users may access.

Content

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

git clone https://github.com/jason-chew/citrea-claw-skill.git ~/.openclaw/skills/citrea-claw-skill cd ~/.openclaw/skills/citrea-claw-skill npm install cp .env.example .env

text

Then ask the user the following questions one at a time and write their answers into `.env`:

Known Vulnerable Dependency: ws==8.18.3 — 2 advisory(ies): CVE-2026-45736 (ws: Uninitialized memory disclosure); CVE-2026-48779 (ws: Memory exhaustion DoS from tiny fragments and data chunks)

High
Category
Supply Chain
Confidence
98% confidence
Finding

The lockfile pins transitive dependency ws to version 8.18.3, and the supplied advisories indicate that this version is affected by an uninitialized memory disclosure flaw and a memory-exhaustion denial-of-service issue. Because this skill performs blockchain monitoring and may use websocket-based RPC/event connections through viem, an exploitable ws issue is relevant in context and could expose process memory or let a remote endpoint degrade or crash the agent.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · src/lib/telegram.js (reported line 6)May include surrounding context.

js
const chatId = process.env.TELEGRAM_CHAT_ID

  if (!token || !chatId) {
    console.warn('⚠️  Telegram not configured — set TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID in .env')
    return
  }

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The README encourages broad natural-language invocations such as asking the agent to check balances, recent transactions, or arbitrage without defining explicit activation boundaries, parameter validation, or confirmation requirements. In an agent-integrated skill, this can cause unintended command execution or sensitive lookups when user prompts are ambiguous, overbroad, or influenced by prompt injection in surrounding context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README advertises Telegram alerts but does not clearly warn that monitored data, addresses, pool activity, and potentially strategy-relevant signals will be transmitted to a third-party service. This creates a privacy and operational security risk because users may unknowingly exfiltrate trading intelligence or wallet-related metadata outside their local environment.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

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.

Content

Scanner excerpt · SETUP.md (reported line 150)May include surrounding context.

npm install

text

**2. Create your `.env` on the server**
```bash
nano .env

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill invokes external commands, uses environment variables, and is designed to access network resources, but it declares no explicit tool scope or allowed-tools restrictions. In an agent environment, that weakens containment and can let the skill exercise more capability than users or platform policy expect.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The visible description omits Telegram alerting and configuration despite those being central behaviors elsewhere in the file. Omitting such capabilities undermines informed consent and prevents accurate risk assessment of secret collection and outbound messaging.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation expands from using an installed monitoring skill into cloning software, installing dependencies, and editing configuration files. That increases supply-chain and persistence risk because an agent may fetch and execute unreviewed code or modify the local environment under the authority of a much narrower-seeming skill.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
90% confidence
Finding

The instruction to write user-provided values into .env establishes durable session persistence for sensitive configuration beyond the immediate interaction. Persistent storage increases the blast radius of a compromise and may keep secrets available long after the user expected the session to end.

Content

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

cp .env.example .env

text

Then ask the user the following questions one at a time and write their answers into `.env`:

1. **Telegram Bot Token** — "Do you have a Telegram bot token? If not, open Telegram, search @BotFather, send /newbot and follow the prompts. Paste your token here, or say skip to set up later:"
   → write to `TELEGRAM_BOT_TOKEN`

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill instructs the agent to collect Telegram credentials and persist them locally even though simple command execution does not require that for every use case. Collecting secrets conversationally and storing them on disk expands the attack surface and increases the chance of accidental disclosure or misuse.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.