T03 · Remote Payload Retrieval and Execution
- Location
assets/templates/PPT Template-level2/1.html:7- Finding
Mutable Remote JavaScript Is Executed Without Version Pinning or Integrity Verification
- Content
View full analysis
``` ### Technical Analysis The templates load and execute JavaScript directly from `unpkg.com` whenever an affected presentation is opened. The dependency uses the mutable `@latest` version selector rather than an immutable, reviewed package version. Consequently, the JavaScript that executes is not necessarily the same code that existed when the Skill was audited. The templates also omit a Subresource Integrity hash, so the browser has no cryptographic mechanism to verify that the downloaded script matches an approved artifact. This creates an external code-execution channel. A malicious package release, compromised package-maintainer account, compromised CDN distribution path, or other upstream supply-chain incident could replace the expected icon-library payload with arbitrary JavaScript. Although this also represents an insecure dependency practice, the best matching classification is remote payload retrieval and execution because the templates directly execute a mutable external script at runtime. ### Attack Path 1. An attacker compromises the upstream Lucide package publication process, a package-maintainer account, or the ...[truncated 1645 chars]- Remediation
View remediation
``` 2. **If remote hosting is unavoidable, pin an exact version** - Replace `@latest` with an immutable, explicitly reviewed release. - Do not use mutable version aliases or floating semantic-version ranges. ```html ``` 3. **Add Subresource Integrity** - Generate and independently verify the SHA-384 or SHA-512 digest of the exact approved artifact. - Add the resulting `integrity` attribute and retain `crossorigin="anonymous"`. ```html ``` The placeholder must not be deployed; it must be replaced with the digest of the reviewed file. 4. **Apply a restrictive Content Security Policy** - Prefer `script-src 'self'` after bundling the dependency locally. - Avoid permitting broad CDN domains or unsafe script execution. - Restrict outbound connections with `connect-src` to reduce exfiltration opportunities. 5. **Update every affected template consistently** - Remediate all ten listed files rather than only the representative SARIF location. - Add an automated repository check that rejects remote scripts, `@latest`, unpinned versions, and external scripts without integrity metadata. 6. **Review generated output** - Verify that the generation and template-reconstruction workflow does not reintroduce remote scripts. - Consider producing fully self-contained HTML document ...[truncated 47 chars]
