T08 · Insecure Dependencies
- Location
SKILL.md:31- Finding
Unpinned Global Installation of a Third-Party npm Package
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 31
Vulnerability Type: Unpinned and globally installed third-party dependency
Risk Level: MediumComplete Code Snippet:
bash npm install -g mineru-open-apiTechnical Analysis
The installation command retrieves the current release of
mineru-open-apiwithout specifying an exact version, lockfile, or package integrity value. This makes the code ultimately installed mutable and prevents users from reliably reproducing a reviewed dependency set.npm packages can execute lifecycle scripts during installation. If the package, its publishing account, or one of its transitive dependencies is compromised, a malicious release could execute code with the privileges of the user running npm. The
-goption increases exposure by modifying the user's global npm environment rather than installing the package in an isolated, project-specific context.The audit did not establish that the named package is malicious. The confirmed issue is the unsafe dependency acquisition and installation practice.
Attack Path
- An attacker compromises the package publisher, a relevant dependency, or the package distribution channel.
- The attacker publishes a malicious release under the expected package name.
- A user follows the Skill's installation command, which requests the latest available release because no exact version is specified.
- npm downloads the attacker-controlled package or transitive dependency.
- Malicious lifecycle scripts can execute during installation, or malicious package logic can execute when the CLI is subsequently invoked.
- The payload operates with the installing or invoking user's effective permissions.
Impact Assessment
Successful exploitation could permit arbitrary code execution under the affected user's account. The resulting access could include reading or altering files available to that user, modifying the globa ...[truncated 309 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to an exact, reviewed version instead of implicitly installing the latest release.
- Verify the package's official publisher, source repository, release provenance, and expected package name before installation.
- Use a project-local dependency with a committed lockfile rather than
npm install -g. - Enforce package integrity and provenance verification in the installation workflow.
- Review transitive dependencies and npm lifecycle scripts before approval.
- Run the CLI in a restricted container or sandbox with access limited to the intended input PDF and output directory.
- Disable installation scripts where operationally possible, then explicitly review any functionality that requires them.
- Establish a controlled upgrade process so new versions are security-reviewed before adoption.
