T09 · Insecure Skill Coding Practices
- Location
assets/nanny.html:445- Finding
Persistent DOM-Based Cross-Site Scripting Through Unescaped Care Records
- Content
View full analysis
{ h += ''+r.time+''+r.type+''+r.amount+''+(r.duration||'--')+''+(r.burped?'✅ 已拍':'--')+''+(r.notes||'')+'删除'; h += ''; }); $('#main-content').innerHTML = h; ``` The same unsafe rendering pattern is used for diaper notes, cord-care notes, bathing notes, maternal-care notes, meal descriptions, medication information, diary entries, and profile values. ### Technical Analysis The application treats stored and imported data as trusted HTML. Fields such as `notes`, `food`, record types, medication data, names, and identifiers can originate from form input or an arbitrary JSON backup. These values are inserted into HTML strings without output encoding and are then parsed by the browser through `innerHTML`. ...[truncated 2275 chars]- Remediation
View remediation
