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.generatePlantUmlImage=function(d,f,k,u){function z(K,O,H){c1=K>>2;c2=(K&3)<<4|O>>4;c3=(O&15)<<2|H>>6;c4=H&63;r="";r+=C(c1&63);r+=C(c2&63);r+=C(c3&63);return r+=C(c4&63)}function C(K){if(10>K)return String.fromCharCode(48+K);K-=10;if(26>K)return String.fromCharCode(65+K);K-=26;if(26>K)return String.fromCharCode(97+K);K-=26;return 0==K?"-":1==K?"_":"?"}var F=new XMLHttpRequest;F.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(K){r="";
for(i=0;i<K.length;i+=3)r=i+2==K.length?r+z(K.charCodeAt(i),K.charCodeAt(i+1),0):i+1==K.length?r+z(K.charCodeAt(i),0,0):r+z(K.charCodeAt(i),K.charCodeAt(i+1),K.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=f&&(F.responseType="blob");F.onload=function(K){if(200<=this.status&&300>this.status)if("txt"==f)k(this.response);else{var O=new FileReader;O.readAsDataURL(this.response);O.onloadend=function(H){var ka=new Image;ka.onload=function(){try{var fa=ka.width,ca=
ka.height;if(0==fa&&0==ca){var ja=O.result,ma=ja.indexOf(","),aa=decodeURIComponent(escape(atob(ja.substring(ma+1)))),S=mxUtils.parseXml(aa).getElementsByTagName("svg");0<S.length&&(fa=parseFloat(S[0].getAttribute("width")),ca=parseFloat(S[0].getAttribute("height")))}k(O.result,fa,ca)}catch(da){u(da)}};ka.src=O.result};O.onerror=function(H){u(H)}}else u(K)};F.onerror=function(K){u(K)};F.send()};EditorUi.prototype.insertAsPreText=function(d,f,k){var u=this.editor.graph,z=null;u.getModel().beginUpdate();