T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:74
- Finding
- Unversioned Remote Anime.js Module Can Change After Review<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 74 **Vulnerability Type**: Mutable remote JavaScript retrieval and execution **Risk Level**: High ### Vulnerable Code ```html import { animate } from "https://cdn.jsdelivr.net/npm/animejs/+esm"; ``` ### Technical Analysis The documented ES module import retrieves executable JavaScript from a third-party CDN without specifying an exact Anime.js version. Consequently, the code executed by compositions can change after the skill has been reviewed. The browser trusts and executes whatever module the mutable URL returns. If the upstream package, npm publishing account, CDN resolution process, or package release is compromised, the effective payload could become attacker-controlled without any modification to this repository. Unlike the versioned Anime.js example at line 23, this import does not provide a stable dependency version. It also lacks an integrity mechanism that would allow the consumer to verify the retrieved content against a reviewed digest. ### Attack Path 1. A user follows the module-build example in `SKILL.md`. 2. The resulting composition imports Anime.js from the unversioned jsDelivr URL. 3. An attacker compromises the upstream package publication channel, causes a malicious release to become the version resolved by the URL, or otherwise compromises the remote delivery path. 4. The composition loads the mutable URL. 5. The browser executes the attacker-controlled module in the composition's JavaScript context. ### Impact Assessment A successful attack could execute arbitrary JavaScript with the privileges available to the rendered composition. Depending on its hosting context and browser security boundaries, this could permit DOM manipulation, access to data exposed to the page, unauthorized network requests, theft of accessible application state, or corruption of rendered output. The immediate scope is the browser or renderer context that imports the module. This find ...[truncated 136 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the dependency to an exact, reviewed version: ```html import { animate } from "https://cdn.jsdelivr.net/npm/animejs@4.0.2/+esm"; ``` 2. Prefer vendoring the reviewed module or installing it through a lockfile-controlled package workflow rather than importing executable code directly from a mutable remote URL. 3. Where supported, verify remotely loaded resources with Subresource Integrity or an equivalent cryptographic digest. 4. Apply an appropriately restrictive Content Security Policy that limits script origins and outbound connections. 5. Periodically review pinned versions and update them through an explicit, tested dependency-update process. ]]>
