T08 · Insecure Dependencies
- Location
SKILL.md:63- Finding
Unpinned Global npm Dependency Creates a Supply-Chain Risk
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 63–67
Vulnerability Type: Unpinned third-party package installed globally
Risk Level: HighComplete Code Snippet:
markdown ## Установка ```bash npm install -g mcp-server-filesystemtext ### Technical Analysis The installation instructions retrieve and globally install the latest available release of `mcp-server-filesystem` without specifying an exact version, lockfile, package integrity hash, or verified build provenance. The project contains no local implementation against which the installed package's behavior can be audited. Because the package version is mutable, the code executed by users can differ from the code reviewed when this Skill was authored. A compromised npm account, malicious future release, package ownership transfer, or registry-level supply-chain incident could introduce arbitrary lifecycle scripts or malicious runtime behavior. The declared GitHub homepage alone does not cryptographically establish that the npm artifact was built from the referenced source. Global installation also increases exposure because the executable becomes available system-wide for the installing user and may replace or conflict with an existing executable of the same name. ### Attack Path 1. An attacker compromises the package publisher, obtains package ownership, or otherwise causes a malicious release to be published under the expected npm package name. 2. A user follows the documented `npm install -g mcp-server-filesystem` instruction. 3. npm resolves the mutable latest release rather than a previously audited version. 4. Malicious package lifecycle scripts may execute during installation with the privileges of the installing account. 5. The installed executable may execute additional malicious behavior whenever the Skill invokes the MCP filesystem server. ### Impact Assessment Successful exploitation can execute arbitrary code wi ...[truncated 470 chars]- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to a specifically reviewed version rather than resolving the latest release.
- Record and verify the package integrity hash using an npm lockfile or an equivalent integrity-controlled installation mechanism.
- Verify that the npm package name, publisher, source repository, and release provenance correspond to the intended upstream project.
- Prefer a local, project-scoped installation over
npm install -gto reduce system-wide exposure. - Use reproducible builds and verify signed release provenance where upstream support is available.
- Disable npm lifecycle scripts during installation where operationally feasible, then explicitly audit any scripts required for normal operation.
- Run the server under a dedicated, minimally privileged account or container with access only to the required filesystem paths.
- Periodically review pinned versions and update them through a controlled security-review process.
