T08 · Insecure Dependencies
- Location
SKILL.md:15- Finding
Unpinned Global Installation of a Third-Party npm Package
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 15
Vulnerability Type: Unpinned third-party dependency installed globally
Risk Level: MediumVulnerable Code
bash npm install -g dianju-ofd-toolsTechnical Analysis
The installation instructions retrieve the latest available version of
dianju-ofd-toolsrather than an exact, reviewed version. The package source and lockfile are not included in the audited project, so its implementation, transitive dependencies, and npm lifecycle scripts could not be verified.A global npm installation may execute package lifecycle scripts with the privileges of the user running npm. Because the version is not pinned, the effective code installed by this instruction can change after this audit without any modification to
SKILL.md. A compromised package release, maintainer account, registry response, or transitive dependency could consequently introduce arbitrary code.Attack Path
- An attacker compromises the npm package, a package maintainer, or one of its transitive dependencies.
- The attacker publishes a malicious release under the existing package name.
- A user follows the documented
npm install -g dianju-ofd-toolsinstruction. - npm resolves the unpinned dependency to the malicious release.
- Malicious lifecycle code executes during installation, or malicious application code executes when the installed CLI or MCP service starts.
- The payload operates with the installing or service-running user's permissions.
Impact Assessment
Successful exploitation could allow arbitrary code execution under the current user's account. Depending on that user's permissions, an attacker could access local files and credentials, alter user-owned programs or configuration, intercept documents and API keys processed by the tool, or establish additional persistence. Global installation also makes the affected executable available outside the proj ...[truncated 40 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the package to an exact version that has undergone security review, for example
dianju-ofd-tools@2.0.0, rather than accepting the latest release. - Publish and verify package integrity information, such as a trusted registry integrity hash or signed release artifact.
- Include the implementation and dependency lockfile in the audited project so package behavior and transitive dependencies can be reviewed.
- Use a trusted, explicitly configured npm registry and enable dependency provenance verification where supported.
- Install the package in an isolated, least-privileged environment rather than globally.
- Disable npm lifecycle scripts with
--ignore-scriptswhere they are not required, after confirming that this does not prevent legitimate operation. - Continuously scan pinned direct and transitive dependencies and require review before upgrading them.
- Pin the package to an exact version that has undergone security review, for example
