jonschlinkert / word-wrap

Wrap words to a specified length.
https://github.com/jonschlinkert
MIT License
193 stars 57 forks source link

Regular Expression Denial of Service (ReDoS) - CVE-2023-26115 #32

Closed tiagojufr closed 1 year ago

tiagojufr commented 1 year ago

Hello,

Today DependencyTrack found this vulnerability in my project.

The issue seems to come from this line.

I know this project hasn't been updated for some years, so should we expect a fix? This is a transitive dependency of eslint, so I believe this issue will get a lot of attention.

Thanks!

aashutoshrathi commented 1 year ago

What can be possible solution to not use regex? As I understand all it has do with is the performance of regex, if there are any active maintainers, I can tak a stab on this one

aashutoshrathi commented 1 year ago

Please check this: https://github.com/jonschlinkert/word-wrap/pull/33

SharpFu commented 1 year ago

I also need you fix the issue for my project if you have free time. @jonschlinkert @hildjj @toddself @zachhale for eslint, there will throw a error: image

aashutoshrathi commented 1 year ago

You can use this @SharpFu

SharpFu commented 1 year ago

@aashutoshrathi how to check it is ok or not. I have re-install ,but not found your package in node_modules

aashutoshrathi commented 1 year ago

@SharpFu you'll find the same folder word-wrap in node_modules. But when you'll check the contents, it'll be from the forked package.

image