T08 · Insecure Dependencies
- Location
SKILL.md:25- Finding
Automatic Execution of Unpinned npm Packages
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:25-31,SKILL.md:59-61,SKILL.md:76-80,README.md:119-128
Vulnerability Type: Unpinned third-party dependency installation and execution
Risk Level: HighVulnerable Code
SKILL.md:25-31:bash npm install -g @lessie/cliOr use without installing:
bash npx @lessie/cli --versionSKILL.md:59-61:json "command": "npx", "args": ["-y", "@lessie/mcp-server"]SKILL.md:76-80:text 1. Check if `lessie` CLI is available: run `lessie status` 2. If the command succeeds → use **CLI mode** (call tools via Bash) 3. If the command fails (not found) → attempt auto-install: `npm install -g @lessie/cli` 4. After install, run `lessie status` again to verify 5. If install succeeds → use **CLI mode**README.md:119-128:json { "mcpServers": { "lessie": { "command": "npx", "args": ["-y", "@lessie/mcp-server"], "env": { "LESSIE_REMOTE_MCP_URL": "https://app.lessie.ai/mcp-server/mcp" } } } }Technical Analysis
The Skill installs and executes
@lessie/cliand@lessie/mcp-serverwithout pinning an exact reviewed version or verifying package integrity. The mode-detection instructions additionally direct the agent to perform a global npm installation automatically whenlessie statusfails.npm install -gandnpx -ycan execute package code and lifecycle scripts with the permissions of the user running the agent. Because package versions are not fixed, the effective code executed can change after the Skill itself has been reviewed. A compromised publisher account, malicious package release, registry compromise, or compromised transitive dependency could consequently introduce arbitrary local code execution.The behavior is related to the declared functionality because a Lessie client is required, but automatic global installati ...[truncated 1416 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin every executable package to an exact reviewed version, for example
@lessie/cli@2.1.0, rather than using an unconstrained package name. - Verify package integrity using a lockfile, trusted digest, signed provenance, or another reproducible verification mechanism.
- Remove automatic installation from mode detection. If the CLI is missing, explain the required installation and obtain explicit user approval before changing the system.
- Avoid global installation where possible. Install into a dedicated, least-privileged project directory or isolated environment.
- Replace
npx -ywith a pinned, preinstalled executable. Do not automatically accept and execute an unknown current registry version. - Run the CLI or MCP server in a sandbox with restricted filesystem, credential, and network access.
- Document the package version and expected publisher or integrity information so users can verify what will execute.
- Pin every executable package to an exact reviewed version, for example
