Skip to content
New issue

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

Regular Expression Denial of Service in trim-newlines #20

Closed
Galitan-dev opened this issue Feb 22, 2022 · 3 comments
Closed

Regular Expression Denial of Service in trim-newlines #20

Galitan-dev opened this issue Feb 22, 2022 · 3 comments

Comments

@Galitan-dev
Copy link

Dependency Alert

Dependabots says:

The trim-newlines package before 3.0.1 and 4.x before 4.0.1 for Node.js has an issue related to regular expression denial-of-service (ReDoS) for the .end() method.

Can you please upgrade trim-newlines version to 3.0.1 ?

@Galitan-dev
Copy link
Author

Vive Toulouse au passage

@bokub
Copy link
Owner

bokub commented Feb 22, 2022

Hello Galitan !

Je ne suis pas sûr de comprendre comment une ReDoS peut être lancée sur un outil CLI, mais dans tous les cas la fonction .end() de trim-newlines n'est pas utilisée dans ce package.

En effet, trim-newlines est une dépendance de meow, qui l'utilise pour gérer le --help, mais qui n'utilise pas .end(): https://github.com/sindresorhus/meow/blob/main/index.js#L166

@bokub
Copy link
Owner

bokub commented Apr 19, 2022

Fixed in release 2.0.0 ! 🎉

@bokub bokub closed this as completed Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants