Language: JavaScript
Label: vulnerable
CWE: CWE-400 \u2014 Uncontrolled Resource Consumption
The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources.

Code:
Graph.sanitizeHtml=function(a,c){return Graph.domPurify(a,!1)};Graph.sanitizeLink=function(a){var c=document.createElement("a");c.setAttribute("href",a);Graph.sanitizeNode(c);return c.getAttribute("href")};Graph.sanitizeNode=function(a){return Graph.domPurify(a,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(a){a.hasAttribute("xlink:href")&&!a.getAttribute("xlink:href").match(/^#/)&&a.remove()});