The vulnerability is an XSS flaw in domino, a dependency of @angular/platform-server, caused by improper handling of Unicode characters during HTML serialization. The analysis of the patch in angular/domino pull request #29 reveals the exact location of the bug.
The core issue was in the escapeMatchingClosingTag function (exported as ɵescapeMatchingClosingTag) in lib/NodeUtils.js. The original code used an approach to replace characters that failed when astral (multi-byte) Unicode characters were present in the string before the closing tag that needed to be escaped. This misalignment caused the closing tag (e.g., </iframe>) to be left unescaped in the output.
The fix, implemented in commit 3c2d125eb2d31d1a5e19e3ad7223fada0e9e0c7b, replaces the buggy manual replacement logic with String.prototype.replace(), which correctly handles Unicode and ensures the closing tag is always escaped.
The serializeOne function is the caller of escapeMatchingClosingTag and is responsible for the overall node serialization logic. It decides when to call the escaping function. Therefore, both serializeOne and ɵescapeMatchingClosingTag are critical functions that would appear in a runtime profile when this vulnerability is triggered. The vulnerability allows an attacker to inject a malicious script by providing a string with an astral character followed by a closing tag, which gets rendered on the server and executed in the victim's browser.