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:
161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||60==d.charCodeAt(0)&&63==d.charCodeAt(1)&&120==d.charCodeAt(2)&&109==d.charCodeAt(3)&&108==d.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(d){var g=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var n=g.getFunction,q=this.editor.graph,t=this;g.getFunction=function(v){if(q.isSelectionEmpty()&&null!=t.pages&&0<t.pages.length){var B=
t.getSelectedPageIndex();if(mxEvent.isShiftDown(v)){if(37==v.keyCode)return function(){0<B&&t.movePage(B,B-1)};if(38==v.keyCode)return function(){0<B&&t.movePage(B,0)};if(39==v.keyCode)return function(){B<t.pages.length-1&&t.movePage(B,B+1)};if(40==v.keyCode)return function(){B<t.pages.length-1&&t.movePage(B,t.pages.length-1)}}else if(mxEvent.isControlDown(v)||mxClient.IS_MAC&&mxEvent.isMetaDown(v)){if(37==v.keyCode)return function(){0<B&&t.selectNextPage(!1)};if(38==v.keyCode)return function(){0<
B&&t.selectPage(t.pages[0])};if(39==v.keyCode)return function(){B<t.pages.length-1&&t.selectNextPage(!0)};if(40==v.keyCode)return function(){B<t.pages.length-1&&t.selectPage(t.pages[t.pages.length-1])}}}return!(65<=v.keyCode&&90>=v.keyCode)||q.isSelectionEmpty()||mxEvent.isAltDown(v)||mxEvent.isShiftDown(v)||mxEvent.isControlDown(v)||mxClient.IS_MAC&&mxEvent.isMetaDown(v)?n.apply(this,arguments):null}}return g};var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=