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.createSvgNode=function(a,c,f,e,g){var d=mxUtils.createXmlDocument(),k=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"svg"):d.createElement("svg");null!=g&&(null!=k.style?k.style.backgroundColor=g:k.setAttribute("style","background-color:"+g));null==d.createElementNS?(k.setAttribute("xmlns",mxConstants.NS_SVG),k.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):k.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);k.setAttribute("version","1.1");
k.setAttribute("width",f+"px");k.setAttribute("height",e+"px");k.setAttribute("viewBox",a+" "+c+" "+f+" "+e);d.appendChild(k);return k};Graph.htmlToPng=function(a,c,f,e){var g=document.createElement("canvas");g.width=c;g.height=f;var d=document.createElement("img");d.onload=mxUtils.bind(this,function(){g.getContext("2d").drawImage(d,0,0);e(g.toDataURL())});d.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml"><style>em{color:red;}</style><em>I</em> lick <span>cheese</span></div></foreignObject></svg>')};