T08 · Insecure Dependencies
- Location
SKILL.md:12- Finding
Unpinned Third-Party Package Execution Through npx
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 12
Vulnerability Type: Supply-chain exposure caused by unpinned package execution
Risk Level: HighVulnerable Code
bash npx dianju-ofd-tools --APP_ID=xxx --APP_KEY=xxx --API_URL=http://ip:port/DCSTechnical Analysis
The Quick Start command instructs users to execute
dianju-ofd-toolsthroughnpxwithout specifying an exact package version, integrity hash, lockfile, or trusted registry. Depending on the local npm configuration and cache state,npxmay retrieve the current package release from the configured registry and execute it immediately.The package implementation is not present in the audited project, which contains only
SKILL.md. Therefore, the executable package and its transitive dependencies could not be statically verified. Their effective behavior can also change after this Skill has been reviewed.This creates a supply-chain trust boundary: compromise of the publisher account, npm package, configured registry, or a transitive dependency could turn the documented command into arbitrary local code execution.
Attack Path
- An attacker compromises the package publisher, registry, or a dependency used by
dianju-ofd-tools. - The attacker publishes a malicious version under the same package name.
- A user follows the documented Quick Start command without specifying a version.
npxretrieves and executes the attacker-controlled package.- The malicious package runs with the invoking user's operating-system privileges.
- It may access the supplied credentials, selected documents, environment variables, and other resources available to that user.
Impact Assessment
Successful exploitation could permit arbitrary code execution under the invoking user's account. The accessible scope may include local files readable or writable by that user, the supplied
APP_IDandAPP_KEY, documents selected for conv ...[truncated 163 chars]- An attacker compromises the package publisher, registry, or a dependency used by
- Remediation
View remediation
Remediation Suggestions
- Pin the package to an exact reviewed version, such as
dianju-ofd-tools@X.Y.Z; do not use a floating version range. - Install dependencies through a committed lockfile and use reproducible installation mechanisms such as
npm ci. - Verify package integrity and provenance, including registry source, publisher identity, signatures or attestations where available, and expected integrity hashes.
- Document the official source repository and trusted npm registry.
- Run the package in a restricted environment with only the minimum filesystem and network access required.
- Continuously scan the package and its transitive dependencies for malicious releases and known vulnerabilities.
- Require a new security review before updating the pinned package version.
- Pin the package to an exact reviewed version, such as
