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