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:
EditorUi.prototype.addLinkSection=function(d,g){function n(){var F=document.createElement("div");F.style.width="100%";F.style.height="100%";F.style.boxSizing="border-box";null!=v&&v!=mxConstants.NONE?(F.style.border="1px solid black",F.style.backgroundColor=v):(F.style.backgroundPosition="center center",F.style.backgroundRepeat="no-repeat",F.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");B.innerText="";B.appendChild(F)}mxUtils.write(d,mxResources.get("links")+":");var q=document.createElement("select");
q.style.width="100px";q.style.padding="0px";q.style.marginLeft="8px";q.style.marginRight="10px";q.className="geBtn";var t=document.createElement("option");t.setAttribute("value","auto");mxUtils.write(t,mxResources.get("automatic"));q.appendChild(t);t=document.createElement("option");t.setAttribute("value","blank");mxUtils.write(t,mxResources.get("openInNewWindow"));q.appendChild(t);t=document.createElement("option");t.setAttribute("value","self");mxUtils.write(t,mxResources.get("openInThisWindow"));
q.appendChild(t);g&&(g=document.createElement("option"),g.setAttribute("value","frame"),mxUtils.write(g,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),q.appendChild(g));d.appendChild(q);mxUtils.write(d,mxResources.get("borderColor")+":");var v="#0000ff",B=null;B=mxUtils.button("",mxUtils.bind(this,function(F){this.pickColor(v||"none",function(I){v=I;n()});mxEvent.consume(F)}));n();B.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";B.style.marginLeft="4px";B.style.height=
"22px";B.style.width="22px";B.style.position="relative";B.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";B.className="geColorBtn";d.appendChild(B);mxUtils.br(d);return{getColor:function(){return v},getTarget:function(){return q.value},focus:function(){q.focus()}}};EditorUi.prototype.createUrlParameters=function(d,g,n,q,t,v,B){B=null!=B?B:[];q&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||B.push("lightbox=1"),"auto"!=d&&B.push("target="+d),null!=