T03 · Remote Payload Retrieval and Execution
- Location
net-loader.html:35- Finding
<![CDATA[Mutable Remote Code Execution Through JSONP and Untrusted Onchain HTML]]>
- Content
View full analysis
` element whose source is a mutable, external ...[truncated 2948 chars]- Remediation
View remediation
` element. Retrieve it as non-executable data through a controlled API or a narrowly scoped same-origin backend. 3. Authenticate retrieved content before use: - Require a signature from an explicitly trusted publisher. - Bind the signature to the chain ID, contract, key, operator, content hash, and version. - Reject content whose signer or expected hash is not preconfigured. 4. Do not pass untrusted HTML to `document.write()`. Render plain content through `textContent`. 5. If HTML rendering is required, place it in a separate sandboxed iframe without `allow-scripts`, `allow-same-origin`, forms, popups, top navigation, or wallet access. 6. Apply a restrictive Content Security Policy that disallows inline script, event handlers, arbitrary remote scripts, and unexpected network destinations. 7. Pin and independently verify any relay implementation and deployment. A source-code repository reference is not sufficient to authenticate the deployed endpoint. 8. Clearly document that blockchain data is public and untrusted, regardless of whether it passes an integrity hash check. ]]>
