T08 · Insecure Dependencies
- Location
SKILL.md:30- Finding
Unpinned Globally Installed Third-Party CLI
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 30–34
Vulnerability Type: Unpinned third-party dependency installed globally
Risk Level: MediumComplete Code Snippet:
markdown ## Installation ```bash npm install -g mineru-open-apitext ### Technical Analysis The skill directs the agent to install `mineru-open-api` from the npm registry without specifying an exact version, integrity hash, or lockfile. Dependency resolution can therefore select a package release that was not available during the skill audit and whose behavior may differ from the reviewed expectations. The `-g` option installs the package globally rather than isolating it within the project. During installation, npm may execute package lifecycle scripts with the permissions of the invoking user. The installed CLI is subsequently run against user-supplied PDFs, including potentially confidential documents. The project contains no dependency source, checksum, endpoint configuration, or privacy documentation with which to verify the package's installation behavior or its treatment of document data. ### Attack Path 1. An attacker compromises the npm package, a maintainer account, or a future package release. 2. The agent follows the skill instruction and runs `npm install -g mineru-open-api`. 3. npm resolves and downloads the unpinned release. 4. Malicious package code or lifecycle scripts execute with the invoking user's permissions. 5. The globally installed CLI is invoked on user-selected PDFs. 6. Malicious code can access data available to that user, including input documents, and may transmit it externally or alter generated output. This path depends on compromise or malicious publication of the external dependency; no malicious implementation is included in the audited project itself. ### Impact Assessment Successful exploitation could provide code execution under the invoking user's account. The accessible s ...[truncated 415 chars]- Remediation
View remediation
Remediation Suggestions
- Pin
mineru-open-apito a reviewed, exact version rather than resolving the latest release. - Record and verify the package integrity value through a lockfile or equivalent checksum mechanism.
- Prefer a project-local installation over global installation to reduce scope and improve reproducibility.
- Review the package source, transitive dependencies, and lifecycle scripts before approval.
- Disable npm lifecycle scripts where compatible; otherwise document and review every required script.
- Run conversion in a sandbox or container with minimal filesystem access, restricted credentials, and limited network access.
- Document the remote API endpoints, authentication requirements, data retention policy, and whether input PDFs are uploaded.
- Require explicit user consent before transmitting sensitive documents to an external service.
- Maintain an allowlist of approved package versions and periodically reassess them for known vulnerabilities or ownership changes.
- Pin
