[GHSA-29mw-wpgm-hmr9] Regular Expression Denial of Service (ReDoS) in lodash #2857
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Updates
Comments
Hello!
If i understand correctly,
lodash
team has movedlodash.trim
andlodash.trimend
packages insidelodash
package:https://github.com/lodash/lodash/tree/npm-packages/lodash.trim => https://github.com/lodash/lodash/blob/npm/trim.js
They have stopped updating of these packages:
https://www.npmjs.com/package/lodash.trim
https://www.npmjs.com/package/lodash.trimend
I checked code and looks like there is no fix for this CVE for these packages:
e.g.:
lodash.trimend
still usesstring.replace(reTrimEnd, '')
(with/\s+$/
value) - https://github.com/lodash/lodash/blob/aaa111912cb05e6f0f9f23d1eb8a41ccfcf9c2c2/lodash.trimend/index.js#L356 (fix of this - https://github.com/lodash/lodash/pull/5065/files#diff-36b7ba0ba252cc39fa5921d9484b7674c8bc7af119636ba7f46194ee871047b6R15046).I could be wrong. Can you take a look and correct me/update this advisory.
Thank you in advance!
Best Regards, Dmitriy