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