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:
Menus.prototype.addInsertTableItem=function(a,c,f,e){function g(C){n=d.getParentByName(mxEvent.getSource(C),"TD");var F=!1;if(null!=n){k=d.getParentByName(n,"TR");var K=mxEvent.isMouseEvent(C)?2:4,E=x,O=Math.min(20,k.sectionRowIndex+K);K=Math.min(20,n.cellIndex+K);for(var R=E.rows.length;R<O;R++)for(var Q=E.insertRow(R),P=0;P<E.rows[0].cells.length;P++)Q.insertCell(-1);for(R=0;R<E.rows.length;R++)for(Q=E.rows[R],P=Q.cells.length;P<K;P++)Q.insertCell(-1);A.innerHTML=n.cellIndex+1+"x"+(k.sectionRowIndex+
1);for(E=0;E<x.rows.length;E++)for(O=x.rows[E],K=0;K<O.cells.length;K++)R=O.cells[K],E==k.sectionRowIndex&&K==n.cellIndex&&(F="blue"==R.style.backgroundColor),R.style.backgroundColor=E<=k.sectionRowIndex&&K<=n.cellIndex?"blue":"transparent"}mxEvent.consume(C);return F}e=null!=e?e:!0;c=null!=c?c:mxUtils.bind(this,function(C,F,K){var E=this.editorUi.editor.graph;C=E.getParentByName(mxEvent.getSource(C),"TD");if(null!=C&&null!=E.cellEditor.textarea){E.getParentByName(C,"TR");var O=E.cellEditor.textarea.getElementsByTagName("table");