T09 · Insecure Skill Coding Practices
- Location
assets/render-from-config.js:252- Finding
DOM-Based Cross-Site Scripting Through Unsanitized Extras Configuration
- Content
View full analysis
' + card.label + '' + card.content + ''; }).join(''); ``` The generated `cards` string is subsequently assigned to `extrasSection.innerHTML`, causing configuration-controlled markup to be parsed by the browser. ### Technical Analysis The `card.label`, `card.content`, and `card.type` configuration properties are concatenated directly into an HTML string without contextual encoding, validation, or sanitization. The project documentation explicitly allows `extras.content` to contain HTML. However, the renderer does not distinguish approved formatting elements from active content such as event handlers, script-capable SVG elements, iframes, or dangerous URL schemes. Allowing formatted HTML without an allowlist sanitizer therefore permits arbitrary active markup. For example, a malicious or compromised configuration could contain: ```javascript extras: { status: { label: 'Project status', type: 'ok', content: '' } } ``` When the page renders this configuration, the invalid image triggers its `onerror` handler and executes attacker-controlled JavaScript in the page's origin. The issue is not limited to `extras`. Other configuration fields are also inserted through `innerHTML` in the same renderer, including project metadata, overview labels, key-node content, Gantt labels, and todo descriptions. Consequently, removing only the example payload from `extras` would not fully address the broader unsafe r ...[truncated 1678 chars]
- Remediation
View remediation
