T08 · Insecure Dependencies
- Location
SKILL.md:27- Finding
Unpinned Cloudflare adapter installation creates a mutable supply-chain risk
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:27-29
Vulnerability Type: Unpinned third-party package installation
Risk Level: MediumComplete Code Snippet:
bash npm install @opennextjs/cloudflareTechnical Analysis
The migration instructions install
@opennextjs/cloudflarewithout specifying an audited version or requiring installation from a verified lockfile. Consequently, the command resolves whichever package version and dependency graph the configured npm registry serves at execution time.npm installation can execute package lifecycle scripts. If the package, one of its transitive dependencies, the npm account publishing it, or the configured registry is compromised, code that was not present during this audit could execute on the user's machine. The package name itself appears legitimate; the issue is that the instructions leave the installed artifact mutable and do not prescribe integrity or provenance verification.
Attack Path
- An attacker compromises the package publishing account, a transitive dependency, or the npm registry used by the victim.
- The attacker publishes a malicious package version or modifies the resolved dependency chain.
- A user follows the Skill instructions and runs the unpinned
npm installcommand. - npm retrieves the attacker-controlled release.
- Malicious lifecycle scripts or imported package code execute with the permissions of the invoking user.
Impact Assessment
Successful exploitation could provide arbitrary code execution under the invoking user's account. The malicious package could read or alter project source code, environment files, npm credentials, Cloudflare credentials, SSH keys, and other resources accessible to that user. It could also modify build artifacts or application dependencies, potentially extending the compromise to later deployments. The command does not directly grant elevated operating-system privileges, so t ...[truncated 65 chars]
- Remediation
View remediation
Remediation Suggestions
- Specify an exact, reviewed adapter version rather than allowing npm to select the current release:
bash npm install --save-exact @opennextjs/cloudflare@<audited-version> - Commit
package-lock.jsonand usenpm ciin reproducible installation and deployment workflows. - Review lockfile changes and package provenance before upgrades.
- Use npm registry integrity metadata and trusted registry configuration.
- Where compatible with the package, consider initially installing with lifecycle scripts disabled:
bash npm ci --ignore-scripts - Enable lifecycle scripts only after reviewing which scripts are required.
- Automate dependency vulnerability and provenance checks in CI, while retaining human review for version updates.
- Specify an exact, reviewed adapter version rather than allowing npm to select the current release:
