Back to skill

Security audit

Nla Fulfill

Security checks for vulnerabilities and agentic risk

Overview

This skill is coherent for blockchain escrow fulfillment, but it asks users to run wallet-backed on-chain commands through an unpinned global CLI with weak validation and confirmation guidance.

Review this carefully before installing. Use a pinned and verified nla release, prefer an isolated environment and low-value wallet, avoid exposing unrelated secrets, validate all escrow and address values, and manually approve any command that spends gas, posts fulfillment text on-chain, or transfers tokens.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:42
Finding
Shell Command Injection Through Unvalidated Escrow Parameters<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:22`, `SKILL.md:42-45`, and `SKILL.md:68-70` **Vulnerability Type**: Command injection through unsafe shell argument construction **Risk Level**: High ### Vulnerable Code ```bash nla escrow:status --escrow-uid <uid> ``` ```bash nla escrow:fulfill \ --escrow-uid <escrow_uid> \ --fulfillment "<fulfillment text>" \ --oracle <oracle_address> ``` ```bash nla escrow:collect \ --escrow-uid <escrow_uid> \ --fulfillment-uid <fulfillment_uid> ``` ### Technical Analysis The instructions direct the agent to interpolate user-provided or externally obtained values into Bash commands. These values include the escrow UID, fulfillment UID, fulfillment text, and oracle address. The document does not require strict validation of Ethereum addresses and UIDs or mandate a shell-safe argument-passing mechanism. In particular, placing fulfillment text within double quotes does not neutralize shell command substitution such as `$(...)` or backtick syntax. Unquoted identifier and address placeholders can additionally expose shell metacharacter, argument-injection, and word-splitting risks. The `Bash(nla:*)` tool restriction does not necessarily eliminate this issue when the permitted command begins with `nla` but the shell performs substitutions before invoking it. The actual exploitability depends on how the host agent constructs and executes the documented command. ### Attack Path 1. An attacker supplies a malicious escrow identifier, fulfillment identifier, oracle address, or fulfillment string to the user or agent. 2. The agent substitutes that value directly into one of the documented Bash command templates. 3. Bash parses the resulting command and evaluates embedded substitutions or metacharacters before executing `nla`. 4. The injected command runs with the privileges and environment of the agent process. 5. The attacker may read accessible environment variables or files, alter local data, or interf ...[truncated 1117 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Validate every blockchain identifier before use: - Ethereum addresses should match a strict 20-byte hexadecimal format such as `^0x[a-fA-F0-9]{40}$`. - Escrow and fulfillment UIDs should be validated against their exact documented byte length and encoding. - Reject whitespace, shell metacharacters, control characters, and unexpected option prefixes. 2. Do not assemble commands through string interpolation. Invoke the CLI using an argument array so each value is passed as one literal argument. For example: ```text ["nla", "escrow:fulfill", "--escrow-uid", validatedEscrowUid, "--fulfillment", fulfillmentText, "--oracle", validatedOracleAddress] ``` 3. If the execution environment only supports shell command strings, use a well-tested shell-escaping routine for every dynamic value. Do not rely solely on double quotes. 4. Add an explicit instruction that values displayed by escrow status output remain untrusted and must be validated before reuse. 5. Require transaction previews and explicit user confirmation before any command that commits a bond, spends gas, submits an on-chain fulfillment, or transfers tokens. 6. Run the CLI in a restricted environment with minimal filesystem access, a sanitized environment, and no unrelated credentials. ]]>

T08 · Insecure Dependencies

Error
Location
SKILL.md:7
Finding
Unpinned Global Installation of Wallet-Adjacent npm Dependency<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:7` **Vulnerability Type**: Unpinned third-party dependency and unsafe global installation guidance **Risk Level**: High ### Vulnerable Code ```yaml compatibility: Requires nla CLI installed (npm install -g nla). Requires a funded Ethereum wallet and access to an EVM chain. ``` ### Technical Analysis The Skill recommends installing the `nla` package globally from npm without specifying an audited version, integrity digest, canonical repository, or verified publisher. Consequently, installation resolves to whatever release the registry currently exposes under that package name. npm packages can execute lifecycle scripts during installation. A globally installed package also becomes available across the user's environment and may later change behavior when upgraded. This is particularly sensitive because the CLI operates near Ethereum private keys, funded wallets, transaction parameters, and on-chain transfer operations. The reviewed file does not establish that the package is malicious. The vulnerability is the absence of dependency pinning and provenance controls in a financially sensitive execution context. ### Attack Path 1. A user follows the Skill's prerequisite and runs `npm install -g nla`. 2. npm resolves the current mutable release of the package rather than a reviewed, fixed version. 3. If the package, publisher account, dependency tree, or registry delivery path has been compromised, malicious installation or runtime code is executed. 4. The package may inspect the process environment, npm context, home directory, or wallet configuration accessible to the user. 5. When used for fulfillment or collection, a compromised CLI could steal wallet material, alter transaction parameters, misrepresent transaction results, or execute arbitrary commands. ### Impact Assessment A compromised dependency could execute with the privileges of the user performing the installation or running the CLI ...[truncated 699 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin the CLI to a specifically reviewed version, for example: ```bash npm install --global nla@<audited-version> ``` 2. Document the canonical package publisher, source repository, release tag, and expected integrity digest. 3. Verify the package's npm integrity metadata and compare the installed artifact with a trusted release before execution. 4. Prefer a project-local, lockfile-controlled installation over a global installation. Commit and review the lockfile so transitive dependency versions are fixed. 5. Disable npm lifecycle scripts during installation where compatible: ```bash npm install --ignore-scripts --save-exact nla@<audited-version> ``` 6. Run the CLI with minimal privileges and a sanitized environment. Provide wallet credentials only for the shortest necessary period and avoid exposing unrelated secrets. 7. Use a low-value, task-specific wallet with transaction limits instead of a primary funded wallet. 8. Review updates before changing the pinned version, including the CLI source, bundled files, lifecycle scripts, and dependency-tree changes. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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

Static analysis

No suspicious patterns detected.