Highlights
Cross-Site Scripting: 1 prior fix. Scrutinize any change in this area.
components/prism-core.js: most-fixed (2 issues). Treat as high-risk during review.
1 high-severity fix in this history; regressions here are high-impact.
Recurring patterns
The bug types that recur here, drawn from past fixes, not open vulnerabilities.
Cross-Site Scripting (XSS): The command-line plugin is prone to DOM-based XSS when injecting raw code lines into the DOM. Developers must ensure all command-line wrapper content is output-encoded prior to innerHTML assignment.
Cross-Site Scripting: The core highlighting engine is vulnerable to XSS if token values are recursively written to innerHTML without appropriate HTML entity encoding. Direct execution of user-controlled text remains a primary threat during rendering.
DOM-based XSS: Unsafe string interpolation of context values like 'location.href' inside SVGs and previewer components leads to DOM-based XSS. Strict path canonicalization, prefix verification, and avoiding raw string-to-SVG parsing are necessary mitigations.