We are working on the ReDoS problem and detected 4 vulnerable regex(es) from your repository.
1: (\"(\\.|[^\"])*\") in webglstudio.js/editor/js/extra/litegui.min.js
2: (\"(\\.|[^\"])*\") in webglstudio.js/editor/js/extra/litegui.js
3: \*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+ in webglstudio.js/editor/js/extra/litescene.min.js
4: (\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)|(\/\/.*) in webglstudio.js/editor/js/extra/litegl.min.js
Please try the following:
var pattern = "(\\\"(\\\\.|[^\\\"])*\\\")";
var input = "\"\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b";
var re = new RegExp(pattern);
var matched = input.match(re);
var pattern = "(\\\"(\\\\.|[^\\\"])*\\\")";
var input = "\"\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b\\\b";
var re = new RegExp(pattern);
var matched = input.match(re);
var pattern = "\\*([^*]|[\\r\\n]|(\\*+([^*/]|[\\r\\n])))*\\*+";
var input = "*\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\b";
var re = new RegExp(pattern);
var matched = input.match(re);
var pattern = "(\\/\\*([^*]|[\\r\\n]|(\\*+([^*\\/]|[\\r\\n])))*\\*+\\/)|(\\/\\/.*)";
var input = "/*\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\b";
var re = new RegExp(pattern);
var matched = input.match(re);
We didn’t create a pull request because we're not sure if these cases are possible to take place in your program, we also do not understand the functionality of these regexes as you do. Thank you for your understanding.
We are working on the ReDoS problem and detected 4 vulnerable regex(es) from your repository.
1:
(\"(\\.|[^\"])*\")
in webglstudio.js/editor/js/extra/litegui.min.js 2:(\"(\\.|[^\"])*\")
in webglstudio.js/editor/js/extra/litegui.js 3:\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+
in webglstudio.js/editor/js/extra/litescene.min.js 4:(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)|(\/\/.*)
in webglstudio.js/editor/js/extra/litegl.min.jsPlease try the following:
We didn’t create a pull request because we're not sure if these cases are possible to take place in your program, we also do not understand the functionality of these regexes as you do. Thank you for your understanding.