T08 · Insecure Dependencies
- Location
SKILL.md:34- Finding
Unpinned Global Installation of a Third-Party npm Package
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 34-38
Vulnerability Type: Unpinned third-party dependency installed globally
Risk Level: MediumVulnerable Code
markdown ## Installation ```bash npm install -g mineru-open-apitext ### Technical Analysis The skill directs the agent to install `mineru-open-api` globally without specifying an exact version, lockfile, or package integrity hash. Consequently, the installed code is determined by whichever package version the npm registry resolves at execution time rather than the version reviewed during the skill audit. npm packages and their transitive dependencies may execute lifecycle scripts during installation. If the package, an upstream maintainer account, or a transitive dependency is compromised, a malicious release could execute arbitrary commands while this instruction is followed. Global installation also broadens exposure by placing package files and executable entry points into a shared system or user-level npm location. The audited project does not itself contain a malicious payload, and no compromise of `mineru-open-api` was established. The finding concerns the unsafe, mutable dependency installation process. ### Attack Path 1. An attacker compromises the `mineru-open-api` package, its publisher account, or a transitive dependency. 2. The attacker publishes a malicious version that is selected as the current npm release. 3. An agent follows the skill instruction and runs `npm install -g mineru-open-api`. 4. npm downloads the unreviewed release and its dependency tree. 5. Malicious package code or an installation lifecycle script executes with the privileges of the user running npm. 6. The installed global executable may continue executing attacker-controlled behavior whenever subsequent extraction commands are invoked. ### Impact Assessment Successful exploitation could provide arbitrary code execution with the priv ...[truncated 427 chars]- Remediation
View remediation
Remediation Suggestions
- Pin
mineru-open-apito an exact, reviewed version instead of resolving the latest release. - Record and verify package integrity using a lockfile and npm integrity metadata.
- Prefer a project-local installation such as
npm install --save-exact mineru-open-api@<reviewed-version>over global installation. - Run the package in a restricted container or sandbox with only the PDF input and designated output directory mounted.
- Disable npm lifecycle scripts during installation where compatible, and separately review any scripts required by the package.
- Audit the package's transitive dependency tree and monitor the pinned version for security advisories.
- Avoid installing with administrator or root privileges and restrict access to secrets and unrelated filesystem locations during extraction.
- Pin
