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:
"cells",[Q])),b.fireEvent(new mxEventObject("freehandInserted","cell",Q))}finally{b.model.endUpdate()}n&&b.setSelectionCells([Q])}}for(Q=0;Q<q.length;Q++)q[Q].parentNode.removeChild(q[Q]);d=null;q=[];z=[]}y(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(O,Q){O=Q.getProperty("eventName");Q=Q.getProperty("event");O==mxEvent.MOUSE_MOVE&&e&&(null!=Q.sourceState&&Q.sourceState.setCursor("crosshair"),Q.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(O,Q){if(b.isEnabled()&&
!b.isCellLocked(b.getDefaultParent())&&(O=Q.getEvent(),e&&!mxEvent.isPopupTrigger(O)&&!mxEvent.isMultiTouchEvent(O))){var J=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);J=Math.max(1,J*b.view.scale);var m=C();d=document.createElementNS("http://www.w3.org/2000/svg","path");d.setAttribute("fill",t?m:"none");d.setAttribute("stroke",m);d.setAttribute("stroke-width",J);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(m=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",
m=m.split(" ").map(function(v){return parseFloat(v)*J}).join(" "),d.setAttribute("stroke-dasharray",m));c=[];O=V(O);S(O);u="M"+O.x+" "+O.y;z.push(O);D=[];d.setAttribute("d",t?PerfectFreehand.getSvgPathFromStroke([[O.x,O.y]],p):u);f.appendChild(d);Q.consume()}}),mouseMove:mxUtils.bind(this,function(O,Q){if(d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){O=Q.getEvent();O=V(O);S(O);var J=N(0);if(J)if(z.push(J),t){var m=[];for(J=0;J<z.length;J++)m.push([z[J].x,z[J].y]);D=[];for(var v=2;v<c.length;v+=