T09 · Insecure Skill Coding Practices
- Location
SKILL.md:200- Finding
Unescaped Diagram Content May Enable Active SVG Injection
- Content
View full analysis
名称 描述 ``` ```svg 条件? ``` ```svg `PostgreSQL` ``` ### Technical Analysis The skill directs the agent to place diagram names, descriptions, conditions, and other user-derived values directly into SVG markup. It does not require XML escaping, attribute encoding, URL validation, or sanitization of raw SVG elements. SVG is an active XML format rather than a passive image format. If an attacker-contr ...[truncated 1584 chars]- Remediation
View remediation
`, ``, event-handler attributes such as `onload`, external `href` values, unsafe CSS, and unknown namespace declarations. 6. Permit only fixed local fragment references for markers, gradients, and patterns. 7. Render generated SVG in a sandboxed or isolated environment before distribution. 8. Add adversarial tests covering element termination, attribute breakout, external-resource loading, script elements, event attributes, and malformed XML. ]]>
