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:
StyleFormatPanel.prototype.addSvgRule=function(a,c,f,e,g,d,k){var n=this.editorUi,u=n.editor.graph;k.test(c.selectorText)&&(k=mxUtils.bind(this,function(m,r,x){var A=mxUtils.trim(m.style[r]);""!=A&&"url("!=A.substring(0,4)&&(m=this.createColorOption(x+" "+m.selectorText,function(){var C=A;return(C=C.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===C.length?"#"+("0"+parseInt(C[1],10).toString(16)).slice(-2)+("0"+parseInt(C[2],10).toString(16)).slice(-2)+("0"+parseInt(C[3],
10).toString(16)).slice(-2):""},mxUtils.bind(this,function(C){g[d].style[r]=C;C="";for(var F=0;F<g.length;F++)C+=g[F].cssText+" ";e.textContent=C;C=mxUtils.getXml(f.documentElement);u.setCellStyles(mxConstants.STYLE_IMAGE,"data:image/svg+xml,"+(window.btoa?btoa(C):Base64.encode(C,!0)),n.getSelectionState().cells)}),"#ffffff",{install:function(C){},destroy:function(){}}),a.appendChild(m),a.style.display="")}),k(c,"fill",mxResources.get("fill")),k(c,"stroke",mxResources.get("line")),k(c,"stop-color",
mxResources.get("gradient")))};