T09 · Insecure Skill Coding Practices
- Location
charts/map-compare.html:275- Finding
Stored HTML and JavaScript Injection in Chart Templates
- Content
View full analysis
{ const item = document.createElement('div'); item.className = 'direction-item'; item.innerHTML = `${d.name}:${d.reason} · 第一步:${d.step}`; list.appendChild(item); }); ``` Additional substitutions are placed directly into executable JavaScript contexts: ```javascript const mode = "{{mode}}"; const ganttLabels = {{gantt_labels}}; const ganttStart = {{gantt_start}}; const ganttDuration = {{gantt_duration}}; const ganttTasks = {{gantt_tasks}}; ``` ```javascript const pathName = "{{path_name}}"; const dataPathA = {{data_path_a}}; const dataStatusQuo = {{data_status_quo}}; const milestoneIndex = {{milestone_index}}; const milestoneLabel = "{{milestone_label}}"; const turningPointIndex = {{turning_point_index}}; const hoverLabelsPathA = {{hover_labels_path_a}}; const hoverLabelsStatusQuo = {{hover_labels_status_quo}}; ``` ### Technical Analysis The chart workflow reads career information from user input and persistent memory, substitutes it into complete HTML documents, and renders those documents in an iframe. The templates do not define contextual escaping or strict schema validation. String ...[truncated 2222 chars]- Remediation
View remediation
