Back to skill

Security audit

Uniswap Execute Swap

Security checks for vulnerabilities and agentic risk

Overview

This skill is designed for real crypto swap execution, but it gives the agent autonomous trade authority without a clear final user-confirmation step and uses mutable installation commands.

Review this carefully before installing. Only use it in an environment where you are comfortable allowing an agent and its external Uniswap MCP/trade-executor components to prepare and submit token swaps. Prefer pinned installer versions or immutable commit references, verify the MCP server and executor separately, and require a manual final confirmation before any transaction involving real funds.

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

T08 · Insecure Dependencies

Warning
Location
README.md:9
Finding

Unpinned Third-Party Installation Commands Create a Supply-Chain Risk

Content
View full analysis

Vulnerability Details

File Location: README.md, lines 9–19
Vulnerability Type: Unpinned npm tooling and mutable remote Skill source
Risk Level: Medium

Vulnerable Code

bash
Install into Claude Code or Cursor with:

```bash
npx skills add https://github.com/wpank/Agentic-Uniswap/tree/main/.ai/skills/execute-swap

Or via Clawhub:

bash
npx clawhub@latest install execute-swap
text

### Technical Analysis

The documented installation procedures rely on components that are not pinned to immutable, previously reviewed versions:

- `npx skills` resolves and executes npm-delivered tooling without specifying an exact version.
- The GitHub source references the mutable `main` branch rather than an immutable commit SHA.
- `npx clawhub@latest` explicitly resolves and executes whichever package version currently has the mutable `latest` tag.
- The `execute-swap` package installed through Clawhub is not pinned to a reviewed version or content digest.

Consequently, the code and Skill instructions installed by these commands can differ from the content reviewed during this audit. This is a supply-chain weakness rather than evidence that the current upstream dependencies are malicious.

### Attack Path

1. An attacker compromises an npm publisher account, package registry path, Clawhub entry, GitHub account, or upstream repository.
2. The attacker publishes a malicious package version, changes the package associated with `latest`, or modifies content on the referenced `main` branch.
3. A user follows the installation instructions in `README.md`.
4. `npx` retrieves and executes the mutable installer package, or the installer retrieves modified Skill content.
5. Malicious installer code runs with the privileges of the invoking user, or attacker-controlled Skill instructions are installed into the user's agent environment.

### Impact Assessment

If the npm-executed installer is compromise
...[truncated 694 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin every npm command to a reviewed exact version rather than relying on implicit resolution or @latest, for example:
    bash
    npx clawhub@X.Y.Z install execute-swap@A.B.C
    
  2. Replace the mutable GitHub branch URL with a URL referencing a reviewed immutable commit SHA.
  3. Publish cryptographic checksums or signed release artifacts and require verification before installation.
  4. Use npm provenance, package signatures, lockfiles, and registry integrity metadata where supported.
  5. Run installation in a sandbox or least-privileged environment without wallet secrets or unrelated credentials.
  6. Document the exact reviewed versions and commit identifiers so users can reproduce the audited installation.
  7. Audit the external Agentic-Uniswap MCP server and trade-executor implementation separately because transaction execution occurs outside this repository.
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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (4)

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding

The README instructs users to execute an unpinned package via npx skills, which fetches and runs code at install time without fixing the exact version or integrity. If the upstream package, dependency chain, or distribution channel is compromised, users could execute attacker-controlled code on their machine.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding

The command npx clawhub@latest install execute-swap uses a moving latest tag, which causes users to run whatever code is currently published rather than a reviewed, fixed version. In a wallet-related skill context, this is more dangerous because a compromised installer could tamper with trading workflows, exfiltrate secrets, or alter transaction behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill advertises autonomous swap execution but does not clearly warn users that it can perform real on-chain transactions. In a financial context, missing disclosure increases the risk of accidental invocation, unintended asset movement, and user misunderstanding about the consequences of using the skill.

Content

No source excerpt is available for this finding.

External Model or Provider Selection

Medium
Category
Excessive Agency
Confidence
90% confidence
Finding

Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Content

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

md
mcp__uniswap__get_supported_chains,
  mcp__uniswap__search_tokens,
  mcp__uniswap__check_safety_status
model: opus
---

# Execute Swap

Static analysis

No suspicious patterns detected.