T09 · Insecure Skill Coding Practices
- Location
SKILL.md:231- Finding
Unsanitized Editable HTML Persisted into Exported Presentations
- Content
View full analysis
\n' + document.documentElement.outerHTML; editables.forEach(function(el) { el.setAttribute('contenteditable', 'true'); }); document.body.classList.add('edit-mode'); banner.classList.add('show'); var blob = new Blob([html], { type: 'text/html' }); var a = document.createElement('a'); a.href = URL.createObjectURL(blob); a.download = 'edited.html'; a.click(); URL.revokeObjectURL(a.href); } ``` ### Technical Analysis The implementation enables rich browser editing by applying `contenteditable="true"` to multiple presentation elements. Contenteditable regions can accept formatted HTML through paste, drag-and-drop, or browser editing operations. Before export, the code removes only the `contenteditable` attributes. It does not sanitize the contents of the editable elements. It then serializes the entire live document using `document.documentElement.outerHTML` and saves it as an executable HTML document. Consequently, active markup introduced in ...[truncated 1682 chars]- Remediation
View remediation
