T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:15
- Finding
- Unpinned Global Installation of a Third-Party npm Package## Vulnerability Details **File Location**: `SKILL.md`, lines 15-23 **Vulnerability Type**: Unpinned third-party dependency installed globally **Risk Level**: Medium ```markdown ## Installation ```bash npm install -g @youmind-ai/cli ``` To verify installation: `youmind` (should print usage info). If the command is not found, install it first before proceeding. ``` ### Technical Analysis The skill directs the agent to install the latest available version of `@youmind-ai/cli` without an exact version pin, lockfile, integrity hash, or other provenance verification. The `-g` option installs the package globally in the user's environment and exposes package-provided executables through the system command lookup path. npm installations may execute package lifecycle scripts with the privileges of the invoking user. Consequently, a compromised publisher account, malicious future release, or other supply-chain compromise could cause arbitrary package code to run during installation. The package identity is consistent with the service described by the skill, but its ownership and contents cannot be verified from the audited project. ### Attack Path 1. An attacker compromises the npm publisher account or otherwise causes a malicious release of `@youmind-ai/cli` to become the version selected by npm. 2. The agent follows the skill and executes `npm install -g @youmind-ai/cli`. 3. npm retrieves the unpinned malicious release. 4. Attacker-controlled lifecycle scripts or package installation code execute with the privileges of the agent's operating-system account. 5. The installed global `youmind` executable can continue executing attacker-controlled behavior when subsequent skill commands are invoked. ### Impact Assessment Successful exploitation could grant the malicious package the same local privileges as the user running npm. This may permit access to user-readable files and environment variables, modification of user ...[truncated 243 chars]
- Remediation
- ## Remediation Suggestions - Pin the dependency to a reviewed exact version, for example `@youmind-ai/cli@3.0.2`, rather than resolving the latest release. - Verify the selected package version and its publisher against an authoritative YouMind distribution channel. - Record and validate the expected package integrity hash. - Prefer a project-local installation governed by a committed lockfile instead of a global installation. - Run installation in a sandbox or restricted environment with minimal filesystem and credential access. - Disable npm lifecycle scripts where compatible with the package, or audit all lifecycle scripts before allowing them to execute. - Document a trusted package registry and reject unexpected registry overrides. - Avoid running the installation with `sudo`, an administrator account, or other elevated privileges.
