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