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:
Graph.prototype.createLayersDialog=function(b,e){var g=document.createElement("div");g.style.position="absolute";for(var p=this.getModel(),y=p.getChildCount(p.root),q=0;q<y;q++)mxUtils.bind(this,function(E){function L(){p.isVisible(E)?(M.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(G,75)):(M.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(G,25))}var T=this.convertValueToString(E)||mxResources.get("background")||"Background",G=document.createElement("div");G.style.overflow=
"hidden";G.style.textOverflow="ellipsis";G.style.padding="2px";G.style.whiteSpace="nowrap";G.style.cursor="pointer";G.setAttribute("title",mxResources.get(p.isVisible(E)?"hideIt":"show",[T]));var M=document.createElement("img");M.setAttribute("draggable","false");M.setAttribute("align","absmiddle");M.setAttribute("border","0");M.style.position="relative";M.style.width="16px";M.style.padding="0px 6px 0 4px";e&&(M.style.filter="invert(100%)",M.style.top="-2px");G.appendChild(M);mxUtils.write(G,T);g.appendChild(G);
mxEvent.addListener(G,"click",function(){p.setVisible(E,!p.isVisible(E));L();null!=b&&b(E)});L()})(p.getChildAt(p.root,q));return g};