T08 · Insecure Dependencies
- Location
SKILL.md:99- Finding
Unpinned Vercel CLI Execution in Production Deployment Workflow
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 99–103
Vulnerability Type: Unpinned third-party package execution
Risk Level: MediumVulnerable Code:
bash npx vercel whoami npx vercel deploy dist --prod --yesTechnical Analysis
The documented workflow invokes the Vercel CLI through
npxwithout specifying a package version or requiring an audited, lockfile-controlled local installation. If the package is unavailable locally,npxmay download and execute a current package release from the configured npm registry.This creates a supply-chain risk because the code executed by the command can differ from the code reviewed when the Skill was authored. A compromised package release, npm registry, package maintainer account, or package-resolution configuration could result in arbitrary code execution under the invoking user's account.
The deployment command compounds the risk by combining unpinned code execution with
--prod --yes. These options target production and suppress interactive confirmation, allowing the localdistdirectory to be published immediately.Attack Path
- A user follows the deployment instructions in
SKILL.md. - The requested Vercel CLI is not present in the local project or package cache.
npxresolves and downloads an unpinned version from the configured package registry.- A compromised or unexpectedly modified package release executes with the user's local privileges.
- The package can access resources available to the process, potentially including environment variables, source files, npm configuration, and Vercel authentication material.
- The second command can deploy the contents of
distdirectly to the production Vercel environment without an interactive approval step.
Impact Assessment
Successful exploitation could provide code execution with the privileges of the user running
npx. Accessible Vercel credentials could allo ...[truncated 515 chars]- A user follows the deployment instructions in
- Remediation
View remediation
Remediation Suggestions
-
Add a specifically reviewed Vercel CLI version to
devDependencies, for example:bash npm install --save-dev --save-exact vercel@REVIEWED_VERSION -
Commit
package.jsonand the generated lockfile, and usenpm ciin development and CI to enforce lockfile-based installation. -
Invoke the locked dependency through a package script rather than allowing
npxto resolve an arbitrary current release:json { "scripts": { "vercel:whoami": "vercel whoami", "deploy:production": "vercel deploy dist --prod" } } -
Avoid
--yesfor manual production deployment so the operator must confirm the target and action. -
Prefer a reviewed CI/CD pipeline with protected branches, required approvals, immutable dependency installation, and environment-scoped deployment credentials.
-
Grant the deployment token only the minimum required Vercel permissions, keep it out of local documentation and source control, and rotate it if package compromise is suspected.
-
Review dependency updates before changing the pinned CLI version and use package integrity checks and trusted registry configuration.
-
