T09 · Insecure Skill Coding Practices
- Location
references/js-engine.md:226- Finding
Silent Same-Origin Transmission of Complete Presentation Content
- Content
View full analysis
\n' + document.documentElement.outerHTML; const bytes = new TextEncoder().encode(html); fetch(location.pathname, { method: 'PUT', body: bytes, headers: { 'Content-Type': 'text/html' } }) .catch(() => { const a = Object.assign(document.createElement('a'), { href: URL.createObjectURL(new Blob([html], { type: 'text/html' })), download: location.pathname.split('/').pop() || 'presentation.html' }); a.click(); URL.revokeObjectURL(a.href); }); } ``` This behavior is propagated into numerous generated demonstrations, including `demos/aurora-mesh-zh.html:675`. ### Technical Analysis The save handler serializes the complete document using `document.documentElement.outerHTML`. This includes edited slide text, speaker notes stored in document attributes, embedded resources, and other presentation metadata. It then issues an HTTP `PUT` request to `location.pathname`. A local Blob download is used only when that network request fails. Consequently, when a presentation is served over HTTP or HTTPS, pressing Ctrl/Cmd+S sends the complete presentation to the server currently hosting the page. The request is same-origin and therefore is not blocked by ordinary cross-origin protections. No confirmation prompt, trusted-origin allowlist, explicit server-save configuration, or indication that presentation data will be transmitted is present in the reviewed implementation. Server-side saving may be a legitimate optional feature, but making it the default exceeds the minimum network privileges required for a browser-based HTML presentation generator. ### Attack Path 1. An attacker or untrusted third party hosts a gen ...[truncated 1296 chars]- Remediation
View remediation
