T08 · Insecure Dependencies
- Location
- references/documentation-systems.md:7
- Finding
- Execution of an Unpinned Docusaurus Package<![CDATA[ ## Vulnerability Details **File Location**: `references/documentation-systems.md:7-10` **Vulnerability Type**: Unpinned third-party package execution **Risk Level**: Medium ### Vulnerable Code ```bash # Setup npx create-docusaurus@latest docs classic cd docs && npm start ``` ### Technical Analysis The documented setup command instructs users or an executing agent to retrieve and immediately run the mutable `latest` version of `create-docusaurus`. The effective code therefore can change after the Skill has been reviewed. `npx` may download package code and execute its entry point with the invoking user's permissions. Package installation scripts and transitive dependencies may also run. Although this behavior is relevant to creating a documentation site, automatically executing an unpinned package is not the minimum privilege required to generate documentation. No evidence indicates that the referenced package is currently malicious. The risk arises from mutable remote code, package-registry compromise, account takeover, and compromised transitive dependencies. ### Attack Path 1. An agent follows the documentation-site setup guidance. 2. The agent runs `npx create-docusaurus@latest docs classic`. 3. `npx` resolves the package and dependencies from the configured package registry. 4. A compromised or unexpectedly changed release is downloaded. 5. Package code or lifecycle scripts execute with the user's local permissions. 6. Malicious code could access files, environment variables, network credentials, or source repositories available to that user. ### Impact Assessment Successful exploitation would provide code execution under the account running `npx`. The accessible scope could include the current project, user-readable files, environment variables, package-registry credentials, and other resources available to the invoking process. The command does not itself request elevated operating-system privileges, so its direct privilege boundary is ...[truncated 34 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Replace `@latest` with an exact, reviewed version, such as `create-docusaurus@x.y.z`. - Record the selected version in a lockfile and review lockfile changes. - Require explicit user approval before downloading or executing packages. - Use a trusted registry and package-manager integrity verification. - Run scaffolding tools in a restricted container or sandbox without production secrets. - Disable package lifecycle scripts where feasible during dependency review. - Periodically scan direct and transitive dependencies for known vulnerabilities. ]]>
