T08 · Insecure Dependencies
- Location
SKILL.md:14- Finding
Unpinned Third-Party Dependencies Installed from Mutable Upstream Sources
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 14–16
Vulnerability Type: Unpinned and globally installed third-party dependencies
Risk Level: Mediumbash npm install -g mineru-open-api # or via Go (macOS/Linux): go install github.com/opendatalab/MinerU-Ecosystem/cli/mineru-open-api@latestTechnical Analysis
The documented installation procedures retrieve third-party software without pinning an audited version or verifying a checksum or cryptographic signature. The Go command explicitly uses the mutable
@latestselector, while the npm command implicitly installs the package version currently associated with the registry's default distribution tag.The npm package is also installed globally. A compromised package release could execute lifecycle scripts during installation and place attacker-controlled executables in a globally accessible binary directory. The installed command is subsequently expected to process potentially sensitive local documents and has access to the
MINERU_TOKENenvironment variable when invoked.This finding does not establish that the current upstream package is malicious. The vulnerability is the unsafe dependency acquisition procedure, which allows the code installed by these instructions to change after the Skill has been reviewed.
Attack Path
- An attacker compromises the npm publisher account, Go source repository, release process, or another relevant upstream distribution channel.
- The attacker publishes a malicious release and makes it the version resolved by the npm default tag or Go's
@latestselector. - A user follows the installation instructions in
SKILL.md. - The package manager downloads the mutable, attacker-controlled version without integrity verification against a known-good artifact.
- For npm, malicious lifecycle code may execute during installation. Alternatively, the installed CLI executes when the user later invokes `mineru- ...[truncated 920 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin both installation methods to a specific, reviewed release rather than relying on the npm default tag or Go's
@latestselector. - For npm, use an explicit version such as
mineru-open-api@<reviewed-version>and prefer a project-local installation with a committed lockfile over a global installation. - For Go, use an explicit immutable version such as
github.com/opendatalab/MinerU-Ecosystem/cli/mineru-open-api@vX.Y.Z. - Publish expected SHA-256 checksums or signature-verification instructions for approved release artifacts.
- Document the verified package publisher, canonical repository, and expected package identity to reduce dependency-confusion and impersonation risks.
- Review package lifecycle scripts and upstream release changes before updating the pinned version.
- Run the parser as an unprivileged account, provide access only to required input and output paths, and expose
MINERU_TOKENonly for the duration of the command.
- Pin both installation methods to a specific, reviewed release rather than relying on the npm default tag or Go's
