Language: JavaScript
Label: vulnerable
CWE: CWE-78 \u2014 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.

Code:
D=document.createElement("div");D.style.height="300px";D.style.width="300px";D.style.display="inline-flex";D.style.justifyContent="center";D.style.alignItems="center";D.style.position="absolute";var L=document.createElement("img");L.onload=function(){function C(){E.model.setStyle(c,e+q())}E=new Graph(K);E.autoExtend=!1;E.autoScroll=!1;E.setGridEnabled(!1);E.setEnabled(!0);E.setPanning(!1);E.setConnectable(!1);E.getRubberband().setEnabled(!1);E.graphHandler.allowLivePreview=!1;var V=E.createVertexHandler;
E.createVertexHandler=function(){var P=V.apply(this,arguments);P.livePreview=!1;return P};if(null!=l)try{if("inset"==l.substring(0,5)){var S=c.geometry,N=L.width,O=L.height,Q=(300-N)/2,J=(300-O)/2,m=l.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),v=parseFloat(m[0]),B=parseFloat(m[1]),H=parseFloat(m[2]),g=parseFloat(m[3]);isFinite(v)&&isFinite(B)&&isFinite(H)&&isFinite(g)?(S.x=g/100*N+Q,S.y=v/100*O+J,S.width=(100-B)/100*N+Q-S.x,S.height=(100-H)/100*O+J-S.y,"round"==m[4]?"50%"==m[5]?p.setAttribute("checked",
"checked"):(I=parseInt(m[5]),y.value=I,n.setAttribute("checked","checked"),t.style.visibility="visible"):k.setAttribute("checked","checked")):l=null}else l=null}catch(P){}c.style=e+(l?l:q());c.vertex=!0;E.addCell(c,null,null,null,null);E.selectAll();E.addListener(mxEvent.CELLS_MOVED,C);E.addListener(mxEvent.CELLS_RESIZED,C);var x=E.graphHandler.mouseUp,F=E.graphHandler.mouseDown;E.graphHandler.mouseUp=function(){x.apply(this,arguments);K.style.backgroundColor="#fff9"};E.graphHandler.mouseDown=function(){F.apply(this,
arguments);K.style.backgroundColor=""};E.dblClick=function(){};var M=E.getSelectionModel().changeSelection;E.getSelectionModel().changeSelection=function(){M.call(this,[c],[c])}};L.onerror=function(){L.onload=null;L.src=Editor.errorImage};L.setAttribute("src",f);L.style.maxWidth="300px";L.style.maxHeight="300px";D.appendChild(L);z.appendChild(D);var K=document.createElement("div");K.style.width="300px";K.style.height="300px";K.style.overflow="hidden";K.style.backgroundColor="#fff9";z.appendChild(K);