T08 · Insecure Dependencies
- Location
HTML模板/mermaid_template.html:7- Finding
Unpinned Remote JavaScript Dependency Without Integrity Verification
- Content
View full analysis
``` ### Technical Analysis The generated HTML attachment loads executable JavaScript from a third-party CDN whenever a recipient opens it. The dependency uses the floating `@11` major-version selector rather than an exact immutable version and does not provide a Subresource Integrity hash. Consequently, the JavaScript executed by previously generated attachments can change after the Skill package has been reviewed. A compromised CDN, compromised upstream package release, or incompatible future release within major version 11 could cause recipients to execute code that was not present during the audit. This also conflicts with the documentation's claim that the Mermaid library is embedded and that the attachment can render without network access. ### Attack Path 1. The Skill generates an HTML diagram attachment containing the remote script reference. 2. An attacker compromises the relevant CDN or upstream package publication channel, or a later dependency release introduces malicious behavior. 3. A recipient opens the generated attachment while connected to the internet. 4. The browser retrieves the changed JavaScript because the URL is not pinned to an immutable artifact. 5. No integrity hash is available to reject the changed response. 6. The downloaded script executes in the attachment's browser context. ### Impact Assessment Successful exploitation permits attacker-controlled JavaScript to run in the security context assigned to the generated attachment. It could manipulate the document, alter displayed PRD content, initiate network requests, or access browser-exposed data available to that document. The issue does not itself grant operating-system priv ...[truncated 181 chars]- Remediation
View remediation
