T09 · Insecure Skill Coding Practices
- Location
assets/report_template.html:143- Finding
Unescaped User-Controlled Content in Generated HTML Report
- Content
View full analysis
📜 二、法律依据
{{LEGAL_CARDS}}🪜 三、维权升级流程
{{TIMELINE_ITEMS}}📝 四、投诉文件
{{COMPLAINT_DOCUMENTS}}💬 五、谈判脚本
{{NEGOTIATION_SCRIPTS}}💰 六、公共收益与税务审计
{{TAX_AUDIT}}``` The same issue also affects `{{REPORT_TITLE}}` in `assets/report_template.html:6` and `assets/report_template.html:112`. ### Technical Analysis The skill directs the agent to replace every template placeholder with generated content and then save the result as an HTML file. Several placeholders can include information derived from a user's dispute description, complaint documents, negotiation scripts, and recommendations. No instruction requires HTML escaping, contextual output encoding, or sanitization before substitution. Consequently, attacker-controlled strings containing HTML can be interpreted as markup rather than displayed as text. If active elements or attributes survive generation, the resulting report may contain script-capable event handlers, deceptive forms ...[truncated 1983 chars]⚠️ 以上内容为法律信息参考,不构成正式法律意见。建议在采取重大法律行动前咨询专业律师。
建议立即采取以下行动:
{{ACTION_RECOMMENDATIONS}}- Remediation
View remediation
`, `"`, and `'`. - Use attribute-specific encoding if a value is ever inserted into an HTML attribute. 2. **Sanitize intentionally generated rich HTML** - If placeholders such as `LEGAL_CARDS` must contain markup, generate that markup from trusted components rather than concatenating arbitrary strings. - Pass rich content through a strict allowlist sanitizer. - Permit only required structural elements and safe attributes. - Remove `
