T03 · Remote Payload Retrieval and Execution
- Location
assets/template.html:911- Finding
Unpinned Third-Party JavaScript Is Retrieved and Executed at Runtime
- Content
View full analysis
Vulnerability Details
File Location:
assets/template.html:911
Vulnerability Type: Mutable remote JavaScript dependency without version pinning or Subresource Integrity
Risk Level: MediumVulnerable Code
html <script src="https://unpkg.com/lucide@latest/dist/umd/lucide.min.js"></script>Technical Analysis
The presentation template automatically retrieves and executes the Lucide UMD bundle from the unpkg CDN whenever a generated HTML presentation is opened with network access.
The dependency uses the mutable
@latesttag rather than an exact package version. It also lacks a Subresource Integrity hash. Consequently, the JavaScript executed by generated presentations can change after the Skill package has been reviewed. The effective runtime behavior therefore depends on the security of the upstream package, its maintainer account, package registry infrastructure, and CDN.This is a supply-chain trust-boundary weakness. If any relevant upstream component is compromised or a malicious release becomes the version resolved by
@latest, arbitrary attacker-controlled JavaScript could execute in the presentation's browser context.No evidence indicates that the currently referenced Lucide package is malicious. The vulnerability is the unsafe and mutable method by which executable third-party content is loaded.
Attack Path
- An attacker compromises the upstream package, a maintainer account, the package publication process, or the CDN delivery path.
- The attacker causes
lucide@latestto resolve to a modified JavaScript bundle. - A user opens an HTML presentation generated from this template while connected to the network.
- The browser requests the script from unpkg.
- Because there is no exact version or integrity check, the browser accepts and executes the modified response.
- The malicious script runs in the generated presentation's browser context.
Impact Assessment
Successful exploitation permits arbitrary ...[truncated 795 chars]
- Remediation
View remediation
Remediation Suggestions
- Preferred: bundle the dependency locally
- Download and review a specific Lucide release.
- Store the reviewed JavaScript inside the project.
- Reference it using a relative path, for example:
html <script src="assets/vendor/lucide-0.x.y.min.js"></script>-
If remote loading is unavoidable, pin an exact version
- Replace
@latestwith a fixed, reviewed version. - Do not use mutable tags or unversioned URLs.
- Replace
-
Add Subresource Integrity
- Generate and verify a cryptographic hash for the exact dependency.
- Add both
integrityandcrossoriginattributes:
html <script src="https://unpkg.com/lucide@EXACT_VERSION/dist/umd/lucide.min.js" integrity="sha384-REVIEWED_HASH" crossorigin="anonymous"></script>-
Apply a restrictive Content Security Policy
- Prefer a policy that permits scripts only from the generated document itself.
- If a CDN must remain enabled, allow only the required host and avoid permissive directives such as
unsafe-eval.
-
Document and monitor dependency provenance
- Record the selected version and hash.
- Review dependency updates before changing the pinned artifact.
- Consider automated integrity verification as part of release checks.
-
Consider removing the runtime dependency
- Pre-render the required SVG icons into generated presentations, eliminating third-party runtime JavaScript entirely.
- Preferred: bundle the dependency locally
