parse5-html-rewriting-stream 7.0.0 before 8.1.1 contains a cross-site scripting vulnerability in RewritingStream#emitText, which skips escaping based on a stale lastStartTagName. Attackers can place entity-encoded markup after a closed script or style element to bypass RewritingStream-based filters and execute script in users' browsers.
https://github.com/inikulin/parse5/releases/tag/v8.1.1
https://github.com/inikulin/parse5/pull/1921
https://github.com/inikulin/parse5/commit/e02abba4aa177b70a3a26cf90f6d62cd3ef8c44a