T08 · Insecure Dependencies
- Location
references/frontend-guide.md:20- Finding
Unpinned Vite Scaffolding Package Executes Mutable Third-Party Code
- Content
View full analysis
Vulnerability Details
File Location:
references/frontend-guide.md:20-22
Vulnerability Type:T08: Insecure Dependencies
Risk Level: MediumComplete Code Snippet:
bash npm create vite@latest my-app -- --template react-ts cd my-app npm installTechnical Analysis
The
@latesttag is mutable and does not identify an immutable, previously reviewed version of the Vite scaffolding package. Following this instruction causes npm to retrieve and execute the package version currently associated with that tag. Package initialization and dependency installation may execute package lifecycle scripts under the developer's account.Because the effective dependency can change after the Skill has been reviewed, the instruction is not reproducible and transfers trust to the current state of the upstream package and npm registry. This behavior is relevant to the Skill's frontend-development purpose, but using a mutable version exceeds the minimum supply-chain trust necessary to provide scaffolding guidance.
Attack Path
- An attacker compromises the upstream package, maintainer account, publishing token, or package distribution channel.
- A malicious release becomes the version referenced by
vite@latest. - A user follows the guide and runs the scaffolding command.
- npm retrieves and executes the changed package under the user's local permissions.
- Malicious package code could read accessible project files or environment variables, alter generated source code, establish outbound connections, or compromise subsequent builds.
Impact Assessment
Exploitation could obtain the privileges of the developer running npm. The accessible scope may include the current project, user-readable files, environment variables, npm configuration and tokens, source-control credentials exposed to the process, and generated application code. No malicious package or active exploitation is present in the audited pr ...[truncated 58 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace
vite@latestwith a reviewed, explicit version, such asvite@X.Y.Z. - Pin generated-project dependencies through a committed lockfile.
- Use
npm cifor repeatable installation after the lockfile has been created. - Review package provenance, signatures, lifecycle scripts, and release integrity before updating.
- Use automated dependency-update tooling to propose reviewed version changes rather than resolving mutable tags at execution time.
- Run untrusted scaffolding in a restricted container or disposable environment without production credentials.
- Replace
