Back to skill

Security audit

Smoothsend Gasless

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent SmoothSend integration guide, but it tells users to put a paid-service API key into public frontend bundles and run unpinned npm/npx packages.

Review before installing or following this skill. If you use SmoothSend on mainnet, do not assume NEXT_PUBLIC_ or VITE_ keeps the API key secret; use a backend or vendor-supported restrictions, quotas, and transaction policy controls before exposing any credit-bearing key. Pin package versions and avoid running unreviewed npx commands in an environment with sensitive secrets.

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

Warning
Location
SKILL.md:64
Finding
Paid-service API credential exposed in client-side application bundles<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 31 and 64–67; the same pattern is repeated at lines 97–100 **Vulnerability Type**: Client-side credential exposure **Risk Level**: Medium ### Vulnerable Code ```markdown 3. **Store API key in env** — use `NEXT_PUBLIC_SMOOTHSEND_API_KEY` or `VITE_SMOOTHSEND_API_KEY` (never hardcode). ``` ```tsx const smoothSend = new SmoothSendTransactionSubmitter({ apiKey: process.env.NEXT_PUBLIC_SMOOTHSEND_API_KEY!, network: "mainnet" // or 'testnet' (always free) }); ``` The Script Composer example repeats the exposure: ```typescript const client = new ScriptComposerClient({ apiKey: process.env.NEXT_PUBLIC_SMOOTHSEND_API_KEY!, network: "mainnet" }); ``` ### Technical Analysis The Skill recommends placing a SmoothSend API key in environment variables with `NEXT_PUBLIC_` or `VITE_` prefixes and consuming it directly in frontend code. In Next.js and Vite, variables with these prefixes are intentionally embedded in browser-accessible JavaScript. Environment-variable storage therefore prevents accidental source-code commits but does not preserve the confidentiality of the credential. The document describes mainnet as a credit-based paid service. If the API key authorizes credit consumption without sufficient server-side transaction restrictions, an attacker can recover and reuse it to submit sponsored transactions or consume the account's prepaid credits. The non-null assertion (`!`) also bypasses compile-time handling for a missing credential but does not provide any security protection. ### Attack Path 1. An operator implements the documented frontend configuration using `NEXT_PUBLIC_SMOOTHSEND_API_KEY` or `VITE_SMOOTHSEND_API_KEY`. 2. The build system embeds the API key in the application's public JavaScript bundle or sends it in browser-originated API requests. 3. An attacker visits the application and inspects its downloaded JavaScript, source maps, runtime configuration, or network traff ...[truncated 1003 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Treat any variable prefixed with `NEXT_PUBLIC_` or `VITE_` as public and explicitly state this in the documentation. 2. Keep credentials capable of consuming paid credits on a trusted backend whenever SmoothSend's integration model permits it. 3. Have the frontend send the intended transaction to the backend rather than sending the billing credential to the browser. 4. Before requesting sponsorship, authenticate the user and validate the transaction destination, network, function, asset, amount, and other application-specific policy constraints. 5. Add per-user and global rate limits, spending limits, replay protection, monitoring, and anomaly alerts. 6. Restrict the API key by allowed origin, application, network, endpoint, transaction policy, and spending quota if SmoothSend supports those controls. 7. Use separate keys for development, testnet, staging, and mainnet. 8. Rotate any key that has already been shipped in a public frontend bundle. 9. If a public client key is required by the service's architecture, clearly identify it as publishable and document the mandatory server-side restrictions that prevent unauthorized credit consumption. ]]>

T08 · Insecure Dependencies

Warning
Location
SKILL.md:53
Finding
Unpinned third-party packages can download and execute mutable supply-chain code<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 53–55 and 163 **Vulnerability Type**: Unpinned third-party dependency installation and execution **Risk Level**: Medium ### Vulnerable Code ```bash npm install @smoothsend/sdk @aptos-labs/wallet-adapter-react ``` The Skill also recommends direct execution through `npx`: ```markdown - MCP (AI context): `npx @smoothsend/mcp` — tools for get_docs, estimate_credits, get_code_snippet ``` ### Technical Analysis Neither command specifies an exact reviewed package version or integrity value. The installation command resolves versions according to current registry metadata and dependency constraints. The `npx` command is more execution-sensitive because it can download the package selected by the registry and immediately invoke its executable. As a result, the effective code installed or executed may differ from the code that existed when the Skill was audited. npm packages can also define lifecycle scripts that execute during installation. A compromised maintainer account, malicious package release, registry compromise, or compromised transitive dependency could consequently introduce attacker-controlled code into a developer or CI environment. The audit found no evidence that the named packages are currently malicious. The vulnerability is the unsafe, mutable dependency-consumption pattern recommended by the Skill. ### Attack Path 1. A maintainer account, package release process, npm registry entry, or transitive dependency is compromised. 2. An attacker publishes a malicious version under one of the referenced package names or modifies a newly resolved dependency version. 3. A developer or CI worker follows the Skill and runs the unpinned `npm install` or `npx @smoothsend/mcp` command. 4. npm retrieves the attacker-controlled version because no exact reviewed version is required. 5. Malicious lifecycle code executes during installation, or the malicious MCP executable runs directly throu ...[truncated 891 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Specify exact, reviewed package versions rather than allowing npm to resolve the latest compatible release. 2. Commit a reviewed lockfile and use `npm ci` in CI and reproducible build environments. 3. Replace bare `npx @smoothsend/mcp` execution with a locally installed, version-pinned package invoked through the project's package manager. 4. When one-time remote execution is unavoidable, specify an exact version and verify package provenance, signatures, integrity, maintainer ownership, and publication history before use. 5. Review package lifecycle scripts and consider installing with scripts disabled where compatible with the package. 6. Use dependency scanning, lockfile monitoring, automated update review, and npm provenance verification. 7. Run package installation and MCP tools in a restricted container or sandbox without unnecessary production secrets, wallet credentials, or deployment permissions. 8. Pin and audit transitive dependencies through the lockfile, not only the two direct dependencies shown in the documentation. ]]>
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (2)

Intent-Code Divergence

Medium
Confidence
98% confidence
Finding
The guidance says to store the SmoothSend API key in environment variables, but the recommended variables are `NEXT_PUBLIC_` and `VITE_`, which are intentionally exposed to client-side bundles. That means any site visitor can recover the key and abuse the commercial service, consume credits, or impersonate the application to the SmoothSend API.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding
The skill references an MCP server via `npx @smoothsend/mcp` without pinning a specific version. This creates a supply-chain risk because future package updates or a compromised published version could change behavior unexpectedly when users run the command, especially since `npx` fetches and executes code directly.

Static analysis

No suspicious patterns detected.