A vulnerability in the parse5 library versions 7.0.0 before 8.1.1 allows for a denial of service (DoS) attack via the Preprocessor#_processSurrogate function. This function is susceptible to an uncaught exception when processing certain surrogate pairs, leading to a RangeError and potentially crashing Node.js processes. The vulnerability can be exploited by supplying input such as U+DC00 U+DC00, which decodes to an out-of-range code point.
A cross-site scripting vulnerability exists in parse5-html-rewriting-stream versions 7.0.0 before 8.1.1. The vulnerability is located in the RewritingStream#emitText method, which skips escaping based on a stale lastStartTagName. This allows attackers to place entity-encoded markup after a closed script or style element to bypass RewritingStream-based filters and execute script in users' browsers.