This repository was archived by the owner on Jun 18, 2026. It is now read-only.
Commit d9d9548
committed
security: fix XSS in GraphTimelineExporter SVG innerHTML rendering
Vertex IDs were interpolated directly into SVG innerHTML via template
literals in the client-side draw() function without HTML escaping.
A vertex name containing '<script>' or event handler attributes
(e.g. '<img onerror=alert(1)>') would execute arbitrary JavaScript
when the timeline HTML file was opened in a browser.
Added escH() HTML-entity encoder and applied it to node ID strings
in both <title> tooltips and <text> labels before innerHTML insertion.1 parent c88ee6b commit d9d9548
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
| 357 | + | |
357 | 358 | | |
358 | 359 | | |
359 | 360 | | |
360 | 361 | | |
361 | 362 | | |
| 363 | + | |
362 | 364 | | |
363 | | - | |
| 365 | + | |
364 | 366 | | |
365 | | - | |
| 367 | + | |
366 | 368 | | |
367 | 369 | | |
368 | 370 | | |
| |||
0 commit comments