Back to skill

Security audit

Lista Wallet Connect

Security checks for vulnerabilities and agentic risk

Overview

This wallet skill appears purpose-aligned, but it handles wallet transactions and local session data with enough unsafe or under-scoped behavior that users should review it before installing.

Install only if you trust this publisher and are comfortable with an agent-accessible wallet bridge. Use a dedicated wallet with limited funds/allowances, review every wallet prompt, avoid --open until shell execution is fixed, prefer your own WalletConnect project ID, avoid debug logs unless necessary, and treat ~/.agent-wallet contents as sensitive.

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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
src/commands/pair.ts:40
Finding
Shell Command Injection Through WalletConnect QR File Opening<![CDATA[ ## Vulnerability Details **File Location**: `src/commands/pair.ts:40-51` **Vulnerability Type**: OS command injection through shell interpolation **Risk Level**: High ### Vulnerable Code ```ts function openFile(filePath: string): boolean { const platform = process.platform; try { if (platform === "darwin") { execSync(`open "${filePath}"`); } else if (platform === "win32") { execSync(`start "" "${filePath}"`); } else { execSync(`xdg-open "${filePath}"`); } return true; } catch { return false; } } ``` The affected path is derived from an environment-controlled home directory: ```ts export const SESSIONS_DIR = join(process.env.HOME || "/tmp", ".agent-wallet"); ``` It reaches the vulnerable function during pairing: ```ts const qrPath = join(SESSIONS_DIR, `qr-${Date.now()}.png`); if (autoOpen) { openedBySystem = openFile(qrPath); } ``` ### Technical Analysis `execSync()` executes a command through a shell when passed a string. Although `filePath` is enclosed in double quotes, embedded quotation marks and shell metacharacters are not escaped. The QR path is constructed under `SESSIONS_DIR`, which in turn is derived from `process.env.HOME`. An attacker capable of controlling the environment of the CLI process can place shell syntax in `HOME`. That syntax becomes part of the command passed to the operating-system shell. The vulnerable path is reached automatically when stdout is a TTY and the process is not detected as an Agent environment. It is also reachable when the `--open` option forces QR opening. This functionality only needs to launch an image viewer with one path argument. Invoking a command shell exceeds the minimum privilege needed for that operation. ### Attack Path 1. The attacker controls or influences the environment used to start the Skill, including `HOME`. 2. The attacker assigns a path containing a quote and shell commands, such as a path conceptually equivalent to: ```te ...[truncated 1382 chars]
Remediation
<![CDATA[ ## Remediation Suggestions Avoid invoking a command shell. Use an executable API that passes the file path as a discrete argument: ```ts import { spawnSync } from "child_process"; function openFile(filePath: string): boolean { let command: string; let commandArgs: string[]; if (process.platform === "darwin") { command = "open"; commandArgs = [filePath]; } else if (process.platform === "win32") { // Prefer a native Windows API or a reviewed library that does not concatenate // untrusted data into a shell command. return false; } else { command = "xdg-open"; commandArgs = [filePath]; } const result = spawnSync(command, commandArgs, { shell: false, stdio: "ignore", }); return !result.error && result.status === 0; } ``` Additional hardening should include: 1. Do not use `execSync()` or `exec()` with interpolated paths. 2. Validate that the generated QR path remains inside the intended session directory. 3. Resolve and validate `HOME` before using it as a security-sensitive storage root. 4. Reject paths containing NUL characters or other platform-invalid path components. 5. Prefer image delivery through the existing `qrPath` or media directive rather than automatically launching desktop applications. 6. Add tests using paths containing quotes, spaces, semicolons, command substitutions, and newline characters. 7. Apply the fix to both the TypeScript source and the prebuilt `dist` artifacts. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
src/storage.ts:21
Finding
Sensitive Wallet Session and Debug Data Stored Without Explicit Restrictive Permissions<![CDATA[ ## Vulnerability Details **File Locations**: - `src/storage.ts:21-24` - `src/cli/debug-log.ts:7-11` - `src/cli/debug-log.ts:109-140` **Vulnerability Type**: Insecure local storage and plaintext sensitive logging **Risk Level**: Medium ### Vulnerable Code Session storage is created without explicit restrictive modes: ```ts export function saveSessions(sessions: Sessions): void { mkdirSync(SESSIONS_DIR, { recursive: true }); writeFileSync(SESSIONS_FILE, JSON.stringify(sessions, null, 2)); } ``` Debug records are appended without an explicit file mode: ```ts function writeRecord(filePath: string, record: Record<string, unknown>): void { try { appendFileSync(filePath, `${JSON.stringify(record)}\n`, "utf8"); } catch { // Never block command execution because of debug logging failures. } } ``` Debug logging captures complete stdout and stderr lines: ```ts const record: Record<string, unknown> = { ts: new Date().toISOString(), pid: process.pid, skill, stream: streamName, line, }; if (isStructuredJson(parsed)) { record.json = parsed; } writeRecord(filePath, record); ``` It also stores the full command arguments: ```ts writeRecord(filePath, { ts: new Date().toISOString(), pid: process.pid, skill, stream: "stderr", line: "debug_log_enabled", config: { filePath, argv: process.argv.slice(2), }, }); ``` ### Technical Analysis Node.js file creation uses permissions derived from broad defaults and the process umask when no explicit mode is supplied. For example, under a common `0022` umask, newly created files may be readable by other local users and directories may be traversable. The session file contains wallet account identifiers, peer metadata, timestamps, chains, and WalletConnect session topics. The underlying WalletConnect store is also created beneath the same directory. These values are not private keys, but session topics and pairing/session metadata are security-sensitive and are explicitly ...[truncated 2636 chars]
Remediation
<![CDATA[ ## Remediation Suggestions Enforce restrictive permissions when creating both directories and files: ```ts export function saveSessions(sessions: Sessions): void { mkdirSync(SESSIONS_DIR, { recursive: true, mode: 0o700 }); writeFileSync(SESSIONS_FILE, JSON.stringify(sessions, null, 2), { encoding: "utf8", mode: 0o600, }); chmodSync(SESSIONS_DIR, 0o700); chmodSync(SESSIONS_FILE, 0o600); } ``` Apply equivalent protection to debug logs: ```ts appendFileSync(filePath, `${JSON.stringify(record)}\n`, { encoding: "utf8", mode: 0o600, }); ``` Further hardening should include: 1. Enforce mode `0700` on `~/.agent-wallet` and WalletConnect storage directories. 2. Enforce mode `0600` on session files, WalletConnect database files, QR images, and debug logs. 3. Correct permissions on pre-existing files rather than relying only on creation modes. 4. Redact or omit pairing URIs, session topics, signatures, full calldata, typed-data payloads, and sensitive command arguments from debug logs. 5. Do not store `process.argv` wholesale; record only an allowlisted command name and non-sensitive flags. 6. Warn users that debug logs may contain wallet-related information and require explicit opt-in. 7. Reject debug-log destinations in unsafe shared directories, or verify the directory owner and permissions before writing. 8. Delete QR images promptly after pairing completes or fails. 9. Consider atomic writes using a securely created temporary file followed by a rename. 10. Add automated tests that verify permissions under permissive umasks. 11. Update the checked-in `dist` output after fixing the source. ]]>
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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (54)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
Use of an undeclared local config file such as `~/.agent-wallet/lending-config.json` introduces hidden configuration dependencies and can cause this skill to inherit RPC settings from another wallet-related component. In a transaction skill, that creates a meaningful trust-boundary issue: transactions or simulations may be routed through endpoints the user did not expect or approve.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
Use of an undeclared local config file such as `~/.agent-wallet/lending-config.json` introduces hidden configuration dependencies and can cause this skill to inherit RPC settings from another wallet-related component. In a transaction skill, that creates a meaningful trust-boundary issue: transactions or simulations may be routed through endpoints the user did not expect or approve.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
Use of an undeclared local config file such as `~/.agent-wallet/lending-config.json` introduces hidden configuration dependencies and can cause this skill to inherit RPC settings from another wallet-related component. In a transaction skill, that creates a meaningful trust-boundary issue: transactions or simulations may be routed through endpoints the user did not expect or approve.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
Use of an undeclared local config file such as `~/.agent-wallet/lending-config.json` introduces hidden configuration dependencies and can cause this skill to inherit RPC settings from another wallet-related component. In a transaction skill, that creates a meaningful trust-boundary issue: transactions or simulations may be routed through endpoints the user did not expect or approve.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
Use of an undeclared local config file such as `~/.agent-wallet/lending-config.json` introduces hidden configuration dependencies and can cause this skill to inherit RPC settings from another wallet-related component. In a transaction skill, that creates a meaningful trust-boundary issue: transactions or simulations may be routed through endpoints the user did not expect or approve.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
Use of an undeclared local config file such as `~/.agent-wallet/lending-config.json` introduces hidden configuration dependencies and can cause this skill to inherit RPC settings from another wallet-related component. In a transaction skill, that creates a meaningful trust-boundary issue: transactions or simulations may be routed through endpoints the user did not expect or approve.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
Use of an undeclared local config file such as `~/.agent-wallet/lending-config.json` introduces hidden configuration dependencies and can cause this skill to inherit RPC settings from another wallet-related component. In a transaction skill, that creates a meaningful trust-boundary issue: transactions or simulations may be routed through endpoints the user did not expect or approve.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
Use of an undeclared local config file such as `~/.agent-wallet/lending-config.json` introduces hidden configuration dependencies and can cause this skill to inherit RPC settings from another wallet-related component. In a transaction skill, that creates a meaningful trust-boundary issue: transactions or simulations may be routed through endpoints the user did not expect or approve.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
Use of an undeclared local config file such as `~/.agent-wallet/lending-config.json` introduces hidden configuration dependencies and can cause this skill to inherit RPC settings from another wallet-related component. In a transaction skill, that creates a meaningful trust-boundary issue: transactions or simulations may be routed through endpoints the user did not expect or approve.

Ae1

High
Category
analysis-evasion
Content
> **Agent quick check:** `node dist/cli/cli.bundle.mjs version`
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
> **Agent quick check:** `node dist/cli/cli.bundle.mjs version`
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
> **Agent quick check:** `node dist/cli/cli.bundle.mjs version`
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
> **Agent quick check:** `node dist/cli/cli.bundle.mjs version`
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Credential Access

High
Category
Privilege Escalation
Content
import { resolve, dirname } from "path";
import { fileURLToPath } from "url";
export function loadLocalEnv() {
    const envPath = resolve(dirname(fileURLToPath(import.meta.url)), "../../.env");
    if (!existsSync(envPath))
        return;
    const content = readFileSync(envPath, "utf8");
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
import { resolve, dirname } from "path";
import { fileURLToPath } from "url";
export function loadLocalEnv() {
    const envPath = resolve(dirname(fileURLToPath(import.meta.url)), "../../.env");
    if (!existsSync(envPath))
        return;
    const content = readFileSync(envPath, "utf8");
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
import { resolve, dirname } from "path";
import { fileURLToPath } from "url";
export function loadLocalEnv() {
    const envPath = resolve(dirname(fileURLToPath(import.meta.url)), "../../.env");
    if (!existsSync(envPath))
        return;
    const content = readFileSync(envPath, "utf8");
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Intent-Code Divergence

High
Confidence
99% confidence
Finding
The file comment and the actual signed content are inconsistent: the comment describes wallet verification, but the message asks the user to authorize transaction requests. This mismatch is dangerous because it can mislead reviewers, integrators, and users about the real security semantics of the flow, especially in a wallet-connect skill whose core purpose includes signing and contract-call operations.

Known Vulnerable Dependency: defu==6.1.4 — 1 advisory(ies): CVE-2026-35209 (defu: Prototype pollution via `__proto__` key in defaults argument)

High
Category
Supply Chain
Confidence
91% confidence
Finding
The lockfile includes defu 6.1.4, which is reported vulnerable to prototype pollution via a __proto__ key in merge/default arguments. In this skill's dependency graph it is pulled in transitively through h3/unstorage, and while package-lock.json alone does not prove a reachable exploit path, WalletConnect-related tooling commonly processes external metadata and configuration objects, so retaining a polluted merge primitive is a real risk if attacker-controlled objects reach it.

Known Vulnerable Dependency: h3==1.15.5 — 4 advisory(ies): CVE-2026-33128 (h3 has a Server-Sent Events Injection via Unsanitized Newlines in Event Stream F); CVE-2026-86252 (h3: SSE Event Injection via Unsanitized Carriage Return (`\r`) in EventStream Da); CVE-2026-86251 (h3: Double Decoding in `serveStatic` Bypasses `resolveDotSegments` Path Traversa) +1 more

High
Category
Supply Chain
Confidence
84% confidence
Finding
h3 1.15.5 is present transitively via unstorage and is associated with multiple server-side issues including SSE injection and path traversal-related flaws. Although this skill is primarily a wallet-connect/signing integration and package-lock.json does not show direct h3 use, the dependency is real and could become reachable if any embedded storage or server helper paths are exposed, making this a legitimate supply-chain risk.

Known Vulnerable Dependency: picomatch==2.3.1 — 2 advisory(ies): CVE-2026-33672 (Picomatch: Method Injection in POSIX Character Classes causes incorrect Glob Mat); CVE-2026-33671 (Picomatch has a ReDoS vulnerability via extglob quantifiers)

High
Category
Supply Chain
Confidence
80% confidence
Finding
Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

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
93% confidence
Finding
ws 8.18.3 is bundled through viem and is reported vulnerable to memory disclosure and memory-exhaustion denial of service. This skill's purpose involves WalletConnect and blockchain communication over WebSocket-capable stacks, so a ws vulnerability is contextually more dangerous because network-facing message handling is central to the skill's operation.

Known Vulnerable Dependency: ws==7.5.10 — 1 advisory(ies): CVE-2026-48779 (ws: Memory exhaustion DoS from tiny fragments and data chunks)

High
Category
Supply Chain
Confidence
94% confidence
Finding
ws 7.5.10 is present via WalletConnect's jsonrpc WebSocket connection stack and is flagged for memory exhaustion DoS. Because WalletConnect inherently relies on WebSocket-based relay communication with externally influenced traffic, an attacker could potentially abuse fragmented frames or chunking behavior against a consumer using this dependency, making this a credible vulnerability in context.

Lp3

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding
The skill requests capabilities that inherently use environment variables and network access, but the manifest does not declare any explicit tool scope or permissions boundary. In a wallet/transaction skill, missing scope declaration weakens reviewability and least-privilege enforcement, making it easier for the agent to perform networked actions or read configuration without clear authorization expectations.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
## Agent Execution Policy

- Execute CLI/setup commands directly as the agent; do not ask the user to run shell commands.
- If dependencies/build/env are missing, fix them automatically in the workspace.
- Before any signing or on-chain write action, explain the action and get user consent.
- Do not output raw JSON/internal payloads to users by default; present concise human-readable summaries.
Confidence
88% confidence
Finding
The instruction to execute setup commands directly, automatically fix dependencies/environment, and not ask the user to run shell commands promotes autonomous system modification. In a wallet-connected skill, that increases risk because package installation, rebuilds, and environment changes can introduce unreviewed code execution or alter transaction-handling behavior before the user understands what happened.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The documentation exposes a concrete WalletConnect project ID and says a default is already included in `.env`, but it does not warn about credential lifecycle, abuse, rotation, or visibility. Even if a WalletConnect project ID is not a high-value secret like a private key, embedding reusable service identifiers encourages hardcoding and can lead to unauthorized use, quota exhaustion, or tracing of activity through a shared project.

Static analysis

Detected: suspicious.dangerous_exec, suspicious.env_credential_access

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
dist/cli/cli.bundle.mjs:215

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
dist/commands/pair.js:39

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
src/commands/pair.ts:43

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
dist/cli/cli.bundle.mjs:53