T03 · Remote Payload Retrieval and Execution
- Location
assets/template.html:53- Finding
Mutable Remote JavaScript Is Executed Without Integrity Verification
- Content
View full analysis
``` ### Technical Analysis The presentation template loads and executes reveal.js directly from jsDelivr using the mutable major-version selector `@5`. This selector can resolve to different reveal.js releases over time, so the code executed by a deployed presentation may differ from the code available when the Skill was audited. The script does not include a Subresource Integrity (`integrity`) hash. Consequently, the browser has no cryptographic mechanism to verify that the downloaded JavaScript matches a reviewed artifact. If the upstream package, publishing account, CDN infrastructure, or a newly resolved version is compromised, attacker-controlled JavaScript could execute in the presentation's browser context. This behavior is disclosed rather than hidden, and no currently embedded malicious payload was identified. The risk arises from allowing a mutable external response to become executable code after review. ### Attack Path 1. An attacker compromises the upstream reveal.js package distribution, its publishing account, the CDN response path, or a future release selected by `@5`. 2. The attacker causes the mutable URL to return modified `reveal.js` code. 3. A user opens a presentation generated from the template. 4. The browser retrieves the remote script from jsDelivr without verifying an integrity hash. 5. The malicious JavaScript executes with the same browser origin and page privileges as the presentation. 6. The payload can inspect or modify the presentation DOM, read browser-accessible same-origin data, issue network requests subject to browser security controls, and misrepresent presentation content to viewers. ### Impact Assessment Successful exploitation provides browse ...[truncated 805 chars]- Remediation
View remediation
``` 2. **Add Subresource Integrity** using a hash generated from the exact deployed file. Recalculate and review the hash intentionally during dependency upgrades. 3. **Prefer vendoring the dependency locally** for presentations that require deterministic or offline operation: ```html ``` 4. Apply exact version pinning and integrity verification to all optional reveal.js plugin scripts and externally hosted stylesheets documented by the Skill. 5. Introduce a controlled dependency-update process that includes release review, vulnerability scanning, and testing before changing the pinned version. 6. Deploy an appropriately restrictive Content Security Policy. Limit `script-src` to trusted local assets or exact approved CDN sources, and use a nonce or hash for the inline `Reveal.initialize` block. ]]>
