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:
mxGraphView.prototype.validateBackgroundStyles=function(){var E=this.graph,d=null==E.background||E.background==mxConstants.NONE?E.defaultPageBackgroundColor:E.background,f=null!=d&&this.gridColor!=d.toLowerCase()?this.gridColor:"#ffffff",g="none",l="";if(E.isGridEnabled()||E.gridVisible){l=10;mxClient.IS_SVG?(g=unescape(encodeURIComponent(this.createSvgGrid(f))),g=window.btoa?btoa(g):Base64.encode(g,!0),g="url(data:image/svg+xml;base64,"+g+")",l=E.gridSize*this.scale*this.gridSteps):g="url("+this.gridImage+
")";var q=f=0;null!=E.view.backgroundPageShape&&(q=this.getBackgroundPageBounds(),f=1+q.x,q=1+q.y);l=-Math.round(l-mxUtils.mod(this.translate.x*this.scale-f,l))+"px "+-Math.round(l-mxUtils.mod(this.translate.y*this.scale-q,l))+"px"}f=E.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);null!=E.view.backgroundPageShape?(E.view.backgroundPageShape.node.style.backgroundPosition=l,E.view.backgroundPageShape.node.style.backgroundImage=g,E.view.backgroundPageShape.node.style.backgroundColor=d,E.view.backgroundPageShape.node.style.borderColor=
E.defaultPageBorderColor,E.container.className="geDiagramContainer geDiagramBackdrop",f.style.backgroundImage="none",f.style.backgroundColor=""):(E.container.className="geDiagramContainer",f.style.backgroundPosition=l,f.style.backgroundColor=d,f.style.backgroundImage=g)};mxGraphView.prototype.createSvgGrid=function(E){for(var d=this.graph.gridSize*this.scale;d<this.minGridSize;)d*=2;for(var f=this.gridSteps*d,g=[],l=1;l<this.gridSteps;l++){var q=l*d;g.push("M 0 "+q+" L "+f+" "+q+" M "+q+" 0 L "+q+