T08 · Insecure Dependencies
- Location
scripts/install.sh:162- Finding
Mutable npm Package Installed Globally Without Integrity Pinning
- Content
View full analysis
Vulnerability Details
File Location:
scripts/install.sh:162-167
Vulnerability Type: Unpinned third-party package installation
Risk Level: HighVulnerable Code
bash global) echo "STEP: Installing OpenSpec CLI globally..." npm install -g @fission-ai/openspec@latest echo "STATUS: ok | ACTION: openspec-cli-installed" ;;Technical Analysis
The installer requests the mutable
latestrelease of@fission-ai/openspecrather than an audited, immutable version. npm installation can execute package lifecycle scripts, meaning the effective code executed by this Skill may change after the Skill itself has been reviewed.The package is also installed globally. Depending on the npm configuration and the account running the Skill, this writes to a user-wide or system-wide package location and exposes the installed executable outside the current project. No checksum, package signature, lockfile, or expected version is validated before installation.
This network access is relevant to the declared installer functionality, but using a mutable release and global scope exceeds a safer minimum-trust implementation.
Attack Path
- An attacker compromises the upstream npm package, publisher credentials, or a future release selected by the
latesttag. - A user selects the OpenSpec global installation option.
- The script downloads the attacker-controlled package through npm.
- Malicious npm lifecycle code executes during installation under the privileges of the user running the script.
- The globally installed executable can remain available to later projects and sessions.
Impact Assessment
Successful exploitation could execute arbitrary commands with the invoking user's privileges, read or modify files accessible to that user, access credentials available to child processes, and alter user-wide development tooling. If the installer is manually run with elevated privileges, the ...[truncated 104 chars]
- An attacker compromises the upstream npm package, publisher credentials, or a future release selected by the
- Remediation
View remediation
Remediation Suggestions
- Replace
@latestwith an exact, reviewed package version. - Verify package integrity against a trusted, documented digest before installation.
- Prefer a project-local installation with a lockfile over global installation where functionality permits.
- Display the exact package version and requested installation scope, then require explicit user confirmation.
- Consider installing with lifecycle scripts disabled during verification, then allow scripts only after reviewing the package contents.
- Document the files and executable paths that the package is expected to create.
- Replace
