T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:18
- Finding
- Unpinned Third-Party Package Installed Globally## Vulnerability Details **File Location**: `SKILL.md`, lines 18-22 **Vulnerability Type**: Unpinned global npm dependency installation **Risk Level**: Medium ```bash ## Установка ```bash npm install -g html-extractor-mcp ``` ``` ### Technical Analysis The documented installation command obtains the current release of `html-extractor-mcp` from the npm registry without specifying an exact version or verifying an integrity hash. Because the selected package release can change after this Skill has been reviewed, users may receive code that differs from the version originally intended. npm packages can also define lifecycle scripts that execute during installation. The global installation option (`-g`) exposes the resulting executable system-wide for the relevant npm prefix and runs installation actions with the privileges of the invoking user. The dependency's implementation is not included in this project, so its source, lifecycle behavior, and runtime behavior could not be verified by this audit. ### Attack Path 1. An attacker compromises the package publisher account, the npm package, or another relevant supply-chain component. 2. The attacker publishes a malicious release under the expected package name. 3. A user follows the unpinned `npm install -g html-extractor-mcp` instruction. 4. npm resolves and downloads the attacker-controlled current release. 5. Malicious lifecycle scripts, if present, execute during installation with the invoking user's privileges. 6. The installed executable may subsequently execute attacker-controlled behavior when invoked through `mcporter`. ### Impact Assessment Successful exploitation could execute arbitrary code with the privileges of the user performing the installation. Depending on those privileges, the malicious package could access user-readable files and credentials, make network requests, alter files writable by that user, or replace the globally exposed `html-extractor- ...[truncated 230 chars]
- Remediation
- ## Remediation Suggestions - Pin the dependency to an exact, reviewed version, such as `html-extractor-mcp@x.y.z`, rather than installing the mutable latest release. - Record and verify the expected package provenance, source repository, publisher, and integrity information. - Prefer a project-local installation with a committed lockfile over a global installation where operationally practical. - Install and run the package under a dedicated, least-privileged account or isolated container. - Disable npm lifecycle scripts during installation with `--ignore-scripts` unless reviewed functionality specifically requires them. - Audit the pinned package and its transitive dependencies before deployment. - Use automated dependency monitoring and require manual review before upgrading the pinned version.
