We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type of Issue Potential Regular Expression Denial of Service (ReDoS)
Description The vulnerable regular expressions are located in
fecs/lib/js/rules/valid-var-jsdoc.js
Line 28 in 6b01e8f
Line 36 in 6b01e8f
The ReDOS vulnerabilities can be exploited with the following string AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_
You can execute the following code to reproduce ReDos
var rule = require('../../../../lib/js/rules/valid-var-jsdoc'); var RuleTester = require('eslint').RuleTester; var ruleTester = new RuleTester({parser: 'babel-eslint'}); ruleTester.run('valid-var-jsdoc', rule, { invalid: [ 'var AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_ = 1;', 'const AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_ = 1;', ], });
I think you can limit the input length or modify this regex.
The text was updated successfully, but these errors were encountered:
Hi, For the CONST_PATTERN, I am willing to suggest that you replace /^[A-Z]([A-Z\d$]+_?)*[A-Z\d$]$/ with /^[A-Z]([A-Z\d$]_?)*[A-Z\d$]$/
/^[A-Z]([A-Z\d$]+_?)*[A-Z\d$]$/
/^[A-Z]([A-Z\d$]_?)*[A-Z\d$]$/
For the PASCAL_PATTERN, you can replace /^([A-Z][a-zA-Z\d$]+)+$/ with /^([A-Z][a-zA-Z\d$]+)$/
/^([A-Z][a-zA-Z\d$]+)+$/
/^([A-Z][a-zA-Z\d$]+)$/
These are equivalent fixes and the fixed regexes are safe.
Sorry, something went wrong.
No branches or pull requests
Type of Issue
Potential Regular Expression Denial of Service (ReDoS)
Description
The vulnerable regular expressions are located in
fecs/lib/js/rules/valid-var-jsdoc.js
Line 28 in 6b01e8f
fecs/lib/js/rules/valid-var-jsdoc.js
Line 36 in 6b01e8f
The ReDOS vulnerabilities can be exploited with the following string
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_
You can execute the following code to reproduce ReDos
I think you can limit the input length or modify this regex.
The text was updated successfully, but these errors were encountered: