T03 · Remote Payload Retrieval and Execution
Warning
- Location
- SKILL.md:413
- Finding
- Generated Reports Execute Mutable Remote JavaScript<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 413 **Vulnerability Type**: Remote JavaScript retrieval and execution **Risk Level**: Medium ### Vulnerable Code ```html <script src="https://cdn.tailwindcss.com"></script> ``` ### Technical Analysis The Skill instructs the agent to embed an unversioned Tailwind CDN script in every generated HTML report. When a report is opened, the browser retrieves and executes the current JavaScript served by `cdn.tailwindcss.com`. The remote payload is not included in the audited project, is not pinned to an immutable version, and has no Subresource Integrity hash. Consequently, its effective behavior can change after the Skill has been reviewed. Compromise of the CDN, its upstream publishing process, or the delivery path could cause attacker-controlled JavaScript to execute in generated reports. This also conflicts with the Skill's stated requirement that reports be single-file documents without external dependencies. ### Attack Path 1. The agent follows `SKILL.md` and generates an HTML report containing the prescribed script element. 2. An attacker compromises the CDN distribution path, upstream publishing process, or content returned from the unpinned endpoint. 3. A user opens the generated report while network access is available. 4. The browser downloads the modified JavaScript from the external endpoint. 5. The attacker-controlled script executes in the report's browser context. 6. The script can inspect or alter report content and initiate outbound network requests, potentially disclosing data embedded in the report. ### Impact Assessment The remote script receives JavaScript execution privileges within the generated report's browser context. A malicious payload could: - Read sensitive brand, audience, campaign, note, and analytics information embedded in the report. - Modify findings or recommendations displayed to the user. - Exfiltrate report content through outbound requests, subje ...[truncated 429 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the runtime Tailwind CDN script from generated reports. 2. Compile the required Tailwind styles during report generation and embed the resulting CSS directly into the single HTML file. 3. Include only the CSS classes used by the report to minimize the embedded stylesheet. 4. Add a restrictive Content Security Policy, for example: ```html <meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src 'unsafe-inline'; img-src data:; font-src data:;"> ``` 5. If a remote resource is strictly unavoidable: - Use an immutable, explicitly versioned asset. - Pin it with a verified Subresource Integrity hash. - Set an appropriate `crossorigin` attribute. - Restrict permitted sources with a Content Security Policy. - Vendor and review the exact dependency before deployment. 6. Validate the final HTML in an offline environment to confirm that it renders without external network access. ]]>
