T09 · Insecure Skill Coding Practices
- Location
scripts/generate_report.py:44- Finding
Unescaped Remote Content Injection into Generated SVG Reports
- Content
View full analysis
• {{n.title}} {{n.source}} | {{n.date[:10]}} {% endfor %} Open-source AI project selection {% for p in projects %} • {{p.name}} ({{p.stars}}★) {{p.description}} {% endfor %} ``` ### Technical Analysis The report generator creates a Jinja2 `Template` directly without configuring XML or HTML autoescaping. Consequently, values obtained from remote RSS feeds and GitHub repository metadata are inserted into the SVG document as raw markup. The affected values include: - RSS article titles - RSS source names - RSS publication dates - GitHub repository names - GitHub repository descriptions - GitHub star values An attacker who controls a selected RSS entry or qualifying GitHub repository can place XML metacharacters and SVG elements in one of these fields. For example, a malicious title could close the current `` element and introduce additional SVG elements. This allows the attacker to alter the generated document structure rather than being limited to displayed text. The generated SVG is subsequently processed by Cair ...[truncated 2109 chars]- Remediation
View remediation
`, quotes, closing `` tags, and injected SVG elements. Verify that the generated SVG contains escaped text and remains valid XML. ]]>
