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:
k,u=0;8>u;u++)l=1==(l&1)?3988292384^l>>>1:l>>>1,Editor.crcTable[k]=l;Editor.updateCRC=function(m,z,J,O){for(var T=0;T<O;T++)m=Editor.crcTable[(m^z.charCodeAt(J+T))&255]^m>>>8;return m};Editor.crc32=function(m){for(var z=-1,J=0;J<m.length;J++)z=z>>>8^Editor.crcTable[(z^m.charCodeAt(J))&255];return(z^-1)>>>0};Editor.writeGraphModelToPng=function(m,z,J,O,T){function W(Y,aa){var ca=X;X+=aa;return Y.substring(ca,X)}function V(Y){Y=W(Y,4);return Y.charCodeAt(3)+(Y.charCodeAt(2)<<8)+(Y.charCodeAt(1)<<16)+
(Y.charCodeAt(0)<<24)}function Q(Y){return String.fromCharCode(Y>>24&255,Y>>16&255,Y>>8&255,Y&255)}m=m.substring(m.indexOf(",")+1);m=window.atob?atob(m):Base64.decode(m,!0);var X=0;if(W(m,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=T&&T();else if(W(m,4),"IHDR"!=W(m,4))null!=T&&T();else{W(m,17);T=m.substring(0,X);do{var Z=V(m);if("IDAT"==W(m,4)){T=m.substring(0,X-8);"pHYs"==z&&"dpi"==J?(J=Math.round(O/.0254),J=Q(J)+Q(J)+String.fromCharCode(1)):J=J+String.fromCharCode(0)+
("zTXt"==z?String.fromCharCode(0):"")+O;O=4294967295;O=Editor.updateCRC(O,z,0,4);O=Editor.updateCRC(O,J,0,J.length);T+=Q(J.length)+z+J+Q(O^4294967295);T+=m.substring(X-8,m.length);break}T+=m.substring(X-8,X-4+Z);W(m,Z);W(m,4)}while(Z);return"data:image/png;base64,"+(window.btoa?btoa(T):Base64.encode(T,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var x=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(m,z){x.apply(this,