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.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(g){return g.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(g){return Graph.isGoogleFontUrl(g)};Graph.createFontElement=function(g,x){var F=Graph.fontMapping[x];null==F&&Graph.isCssFontUrl(x)?(g=document.createElement("link"),g.setAttribute("rel","stylesheet"),g.setAttribute("type","text/css"),g.setAttribute("charset","UTF-8"),g.setAttribute("href",x)):(null==F&&(F='@font-face {\nfont-family: "'+
g+'";\nsrc: url("'+x+'");\n}'),g=document.createElement("style"),mxUtils.write(g,F));return g};Graph.addFont=function(g,x,F){if(null!=g&&0<g.length&&null!=x&&0<x.length){var M=g.toLowerCase();if("helvetica"!=M&&"arial"!=g&&"sans-serif"!=M){var P=Graph.customFontElements[M];null!=P&&P.url!=x&&(P.elt.parentNode.removeChild(P.elt),P=null);null==P?(P=x,"http:"==x.substring(0,5)&&(P=PROXY_URL+"?url="+encodeURIComponent(x)),P={name:g,url:x,elt:Graph.createFontElement(g,P)},Graph.customFontElements[M]=P,