-
-
Notifications
You must be signed in to change notification settings - Fork 303
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
[Security] Fix ReDoS #333
Merged
Merged
[Security] Fix ReDoS #333
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fix potential ReDoS
@ready-research thank you for the changes. I am also waiting to come this change in release so that I can deploy this module without this vulnerabilities. |
@terkelg Thank you for the response. Can you please validate this in https://www.huntr.dev/bounties/ebd7b78f-8501-4598-8dbb-81bcd8a8a672/ using |
This was referenced Oct 28, 2021
kodiakhq bot
referenced
this pull request
in X-oss-byte/Canary-nextjs
Sep 30, 2023
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [prompts](https://togithub.com/terkelg/prompts) | [`2.1.0` -> `2.4.2`](https://renovatebot.com/diffs/npm/prompts/2.1.0/2.4.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/prompts/2.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/prompts/2.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/prompts/2.1.0/2.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/prompts/2.1.0/2.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@types/prompts](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/prompts) ([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped)) | [`2.0.1` -> `2.4.5`](https://renovatebot.com/diffs/npm/@types%2fprompts/2.0.1/2.4.5) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2fprompts/2.4.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2fprompts/2.4.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2fprompts/2.0.1/2.4.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2fprompts/2.0.1/2.4.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### ⚠ Dependency Lookup Warnings ⚠ Warnings were logged while processing this repo. Please check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>terkelg/prompts (prompts)</summary> ### [`v2.4.2`](https://togithub.com/terkelg/prompts/releases/tag/v2.4.2) [Compare Source](https://togithub.com/terkelg/prompts/compare/v2.4.1...v2.4.2) ##### What's Changed - \[Security] Fix ReDoS by [@​ready-research](https://togithub.com/ready-research) in [https://github.com/terkelg/prompts/pull/333](https://togithub.com/terkelg/prompts/pull/333) ##### New Contributors - [@​ready-research](https://togithub.com/ready-research) made their first contribution in [https://github.com/terkelg/prompts/pull/333](https://togithub.com/terkelg/prompts/pull/333) **Full Changelog**: terkelg/prompts@v2.4.1...v2.4.2 ### [`v2.4.1`](https://togithub.com/terkelg/prompts/releases/tag/v2.4.1) [Compare Source](https://togithub.com/terkelg/prompts/compare/v2.4.0...v2.4.1) Fixed issue with cursor in text prompt [#​300](https://togithub.com/terkelg/prompts/issues/300) [#​249](https://togithub.com/terkelg/prompts/issues/249). Thank you [@​krishna-acondy](https://togithub.com/krishna-acondy) ### [`v2.4.0`](https://togithub.com/terkelg/prompts/releases/tag/v2.4.0) [Compare Source](https://togithub.com/terkelg/prompts/compare/v2.3.2...v2.4.0) - Add stdin and stdout to the docs ([#​257](https://togithub.com/terkelg/prompts/issues/257), [#​258](https://togithub.com/terkelg/prompts/issues/258)) - Update build dependencies - Updated readme markup [#​272](https://togithub.com/terkelg/prompts/issues/272) - Loop cursor on all select-style prompts ([#​270](https://togithub.com/terkelg/prompts/issues/270)) - fix(inject): treat undefined in inject as initial value ([#​266](https://togithub.com/terkelg/prompts/issues/266)) - Remove internal use of process.stdout ([#​274](https://togithub.com/terkelg/prompts/issues/274), [#​275](https://togithub.com/terkelg/prompts/issues/275)) - Handle escape as exit + clearFirst feature for autocomplete ([#​280](https://togithub.com/terkelg/prompts/issues/280)) Thank you to all the contributors! 💯 ### [`v2.3.2`](https://togithub.com/terkelg/prompts/compare/v2.3.1...v2.3.2) [Compare Source](https://togithub.com/terkelg/prompts/compare/v2.3.1...v2.3.2) ### [`v2.3.1`](https://togithub.com/terkelg/prompts/releases/tag/v2.3.1) [Compare Source](https://togithub.com/terkelg/prompts/compare/v2.3.0...v2.3.1) - Fix issue where multiselect prompt is rendered wrong [#​253](https://togithub.com/terkelg/prompts/issues/253) [#​175](https://togithub.com/terkelg/prompts/issues/175) - Fix issue where `home` prints `undefined` [#​247](https://togithub.com/terkelg/prompts/issues/247) [#​245](https://togithub.com/terkelg/prompts/issues/245) - Updated dev dependenceis Thank you [@​DrunkenPoney](https://togithub.com/DrunkenPoney) and [@​jamezrin](https://togithub.com/jamezrin) 🎉 ### [`v2.3.0`](https://togithub.com/terkelg/prompts/releases/tag/v2.3.0) [Compare Source](https://togithub.com/terkelg/prompts/compare/v2.2.1...v2.3.0) - Update documentation [#​195](https://togithub.com/terkelg/prompts/issues/195) [#​223](https://togithub.com/terkelg/prompts/issues/223) - Added an option to change the number of items displayed [#​189](https://togithub.com/terkelg/prompts/issues/189) - Fix (multi)select falsy values [#​187](https://togithub.com/terkelg/prompts/issues/187) [#​188](https://togithub.com/terkelg/prompts/issues/188) - Add table of contents for the prompt types [#​222](https://togithub.com/terkelg/prompts/issues/222) - Hiding page number when only single page is there [#​210](https://togithub.com/terkelg/prompts/issues/210) - Evaluate type before other options and skip if falsy [#​217](https://togithub.com/terkelg/prompts/issues/217) - Fix `autocompleteMultiselect` instructions bug [#​216](https://togithub.com/terkelg/prompts/issues/216) - Fix for `opts.out` changed to `opts.stdout` [#​209](https://togithub.com/terkelg/prompts/issues/209) [#​208](https://togithub.com/terkelg/prompts/issues/208) - Fix `Number` prompt can get pass minimum [#​203](https://togithub.com/terkelg/prompts/issues/203) [#​204](https://togithub.com/terkelg/prompts/issues/204) - Fix `Number` type ignore minimum [#​201](https://togithub.com/terkelg/prompts/issues/201) [#​202](https://togithub.com/terkelg/prompts/issues/202) - Add `maxVisible` option for select prompts [#​225](https://togithub.com/terkelg/prompts/issues/225) - Store correct reference of last prompt [#​221](https://togithub.com/terkelg/prompts/issues/221) [#​198](https://togithub.com/terkelg/prompts/issues/198) - Remove multi-pages on autocomplete, instead scroll down/up [#​230](https://togithub.com/terkelg/prompts/issues/230) Thank you everyone! 💯 ### [`v2.2.1`](https://togithub.com/terkelg/prompts/compare/v2.2.0...v2.2.1) [Compare Source](https://togithub.com/terkelg/prompts/compare/v2.2.0...v2.2.1) ### [`v2.2.0`](https://togithub.com/terkelg/prompts/releases/tag/v2.2.0) [Compare Source](https://togithub.com/terkelg/prompts/compare/v2.1.0...v2.2.0) - Fix duplicate output when more than 1 line [#​168](https://togithub.com/terkelg/prompts/issues/168) [#​153](https://togithub.com/terkelg/prompts/issues/153) by [@​DrunkenPoney](https://togithub.com/DrunkenPoney) - Added description option to choices [#​165](https://togithub.com/terkelg/prompts/issues/165) [#​170](https://togithub.com/terkelg/prompts/issues/170) - Options to display instruction text on multi-select prompt [#​174](https://togithub.com/terkelg/prompts/issues/174) [#​177](https://togithub.com/terkelg/prompts/issues/177) by [@​wilmouths](https://togithub.com/wilmouths) and [@​lumio](https://togithub.com/lumio) - Press 'a' to toggle all in multi-select prompt [#​166](https://togithub.com/terkelg/prompts/issues/166) by [@​jeysal](https://togithub.com/jeysal) and [@​lumio](https://togithub.com/lumio) - Fix bug where ALT+<key> prints undefined [#​164](https://togithub.com/terkelg/prompts/issues/164) by [@​lumio](https://togithub.com/lumio) - Allow moving with J and K in select mode [#​161](https://togithub.com/terkelg/prompts/issues/161) by [@​WittBulter](https://togithub.com/WittBulter) - Updated readme [#​176](https://togithub.com/terkelg/prompts/issues/176) by [@​vivaxy](https://togithub.com/vivaxy) Thank you everyone! 💯 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/X-oss-byte/Canary-nextjs).
kodiakhq bot
referenced
this pull request
in X-oss-byte/Nextjs
Oct 4, 2023
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [prompts](https://togithub.com/terkelg/prompts) | [`2.1.0` -> `2.4.2`](https://renovatebot.com/diffs/npm/prompts/2.1.0/2.4.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/prompts/2.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/prompts/2.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/prompts/2.1.0/2.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/prompts/2.1.0/2.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@types/prompts](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/prompts) ([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped)) | [`2.0.1` -> `2.4.5`](https://renovatebot.com/diffs/npm/@types%2fprompts/2.0.1/2.4.5) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2fprompts/2.4.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2fprompts/2.4.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2fprompts/2.0.1/2.4.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2fprompts/2.0.1/2.4.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>terkelg/prompts (prompts)</summary> ### [`v2.4.2`](https://togithub.com/terkelg/prompts/releases/tag/v2.4.2) [Compare Source](https://togithub.com/terkelg/prompts/compare/v2.4.1...v2.4.2) ##### What's Changed - \[Security] Fix ReDoS by [@​ready-research](https://togithub.com/ready-research) in [https://github.com/terkelg/prompts/pull/333](https://togithub.com/terkelg/prompts/pull/333) ##### New Contributors - [@​ready-research](https://togithub.com/ready-research) made their first contribution in [https://github.com/terkelg/prompts/pull/333](https://togithub.com/terkelg/prompts/pull/333) **Full Changelog**: terkelg/prompts@v2.4.1...v2.4.2 ### [`v2.4.1`](https://togithub.com/terkelg/prompts/releases/tag/v2.4.1) [Compare Source](https://togithub.com/terkelg/prompts/compare/v2.4.0...v2.4.1) Fixed issue with cursor in text prompt [#​300](https://togithub.com/terkelg/prompts/issues/300) [#​249](https://togithub.com/terkelg/prompts/issues/249). Thank you [@​krishna-acondy](https://togithub.com/krishna-acondy) ### [`v2.4.0`](https://togithub.com/terkelg/prompts/releases/tag/v2.4.0) [Compare Source](https://togithub.com/terkelg/prompts/compare/v2.3.2...v2.4.0) - Add stdin and stdout to the docs ([#​257](https://togithub.com/terkelg/prompts/issues/257), [#​258](https://togithub.com/terkelg/prompts/issues/258)) - Update build dependencies - Updated readme markup [#​272](https://togithub.com/terkelg/prompts/issues/272) - Loop cursor on all select-style prompts ([#​270](https://togithub.com/terkelg/prompts/issues/270)) - fix(inject): treat undefined in inject as initial value ([#​266](https://togithub.com/terkelg/prompts/issues/266)) - Remove internal use of process.stdout ([#​274](https://togithub.com/terkelg/prompts/issues/274), [#​275](https://togithub.com/terkelg/prompts/issues/275)) - Handle escape as exit + clearFirst feature for autocomplete ([#​280](https://togithub.com/terkelg/prompts/issues/280)) Thank you to all the contributors! 💯 ### [`v2.3.2`](https://togithub.com/terkelg/prompts/compare/v2.3.1...v2.3.2) [Compare Source](https://togithub.com/terkelg/prompts/compare/v2.3.1...v2.3.2) ### [`v2.3.1`](https://togithub.com/terkelg/prompts/releases/tag/v2.3.1) [Compare Source](https://togithub.com/terkelg/prompts/compare/v2.3.0...v2.3.1) - Fix issue where multiselect prompt is rendered wrong [#​253](https://togithub.com/terkelg/prompts/issues/253) [#​175](https://togithub.com/terkelg/prompts/issues/175) - Fix issue where `home` prints `undefined` [#​247](https://togithub.com/terkelg/prompts/issues/247) [#​245](https://togithub.com/terkelg/prompts/issues/245) - Updated dev dependenceis Thank you [@​DrunkenPoney](https://togithub.com/DrunkenPoney) and [@​jamezrin](https://togithub.com/jamezrin) 🎉 ### [`v2.3.0`](https://togithub.com/terkelg/prompts/releases/tag/v2.3.0) [Compare Source](https://togithub.com/terkelg/prompts/compare/v2.2.1...v2.3.0) - Update documentation [#​195](https://togithub.com/terkelg/prompts/issues/195) [#​223](https://togithub.com/terkelg/prompts/issues/223) - Added an option to change the number of items displayed [#​189](https://togithub.com/terkelg/prompts/issues/189) - Fix (multi)select falsy values [#​187](https://togithub.com/terkelg/prompts/issues/187) [#​188](https://togithub.com/terkelg/prompts/issues/188) - Add table of contents for the prompt types [#​222](https://togithub.com/terkelg/prompts/issues/222) - Hiding page number when only single page is there [#​210](https://togithub.com/terkelg/prompts/issues/210) - Evaluate type before other options and skip if falsy [#​217](https://togithub.com/terkelg/prompts/issues/217) - Fix `autocompleteMultiselect` instructions bug [#​216](https://togithub.com/terkelg/prompts/issues/216) - Fix for `opts.out` changed to `opts.stdout` [#​209](https://togithub.com/terkelg/prompts/issues/209) [#​208](https://togithub.com/terkelg/prompts/issues/208) - Fix `Number` prompt can get pass minimum [#​203](https://togithub.com/terkelg/prompts/issues/203) [#​204](https://togithub.com/terkelg/prompts/issues/204) - Fix `Number` type ignore minimum [#​201](https://togithub.com/terkelg/prompts/issues/201) [#​202](https://togithub.com/terkelg/prompts/issues/202) - Add `maxVisible` option for select prompts [#​225](https://togithub.com/terkelg/prompts/issues/225) - Store correct reference of last prompt [#​221](https://togithub.com/terkelg/prompts/issues/221) [#​198](https://togithub.com/terkelg/prompts/issues/198) - Remove multi-pages on autocomplete, instead scroll down/up [#​230](https://togithub.com/terkelg/prompts/issues/230) Thank you everyone! 💯 ### [`v2.2.1`](https://togithub.com/terkelg/prompts/compare/v2.2.0...v2.2.1) [Compare Source](https://togithub.com/terkelg/prompts/compare/v2.2.0...v2.2.1) ### [`v2.2.0`](https://togithub.com/terkelg/prompts/releases/tag/v2.2.0) [Compare Source](https://togithub.com/terkelg/prompts/compare/v2.1.0...v2.2.0) - Fix duplicate output when more than 1 line [#​168](https://togithub.com/terkelg/prompts/issues/168) [#​153](https://togithub.com/terkelg/prompts/issues/153) by [@​DrunkenPoney](https://togithub.com/DrunkenPoney) - Added description option to choices [#​165](https://togithub.com/terkelg/prompts/issues/165) [#​170](https://togithub.com/terkelg/prompts/issues/170) - Options to display instruction text on multi-select prompt [#​174](https://togithub.com/terkelg/prompts/issues/174) [#​177](https://togithub.com/terkelg/prompts/issues/177) by [@​wilmouths](https://togithub.com/wilmouths) and [@​lumio](https://togithub.com/lumio) - Press 'a' to toggle all in multi-select prompt [#​166](https://togithub.com/terkelg/prompts/issues/166) by [@​jeysal](https://togithub.com/jeysal) and [@​lumio](https://togithub.com/lumio) - Fix bug where ALT+<key> prints undefined [#​164](https://togithub.com/terkelg/prompts/issues/164) by [@​lumio](https://togithub.com/lumio) - Allow moving with J and K in select mode [#​161](https://togithub.com/terkelg/prompts/issues/161) by [@​WittBulter](https://togithub.com/WittBulter) - Updated readme [#​176](https://togithub.com/terkelg/prompts/issues/176) by [@​vivaxy](https://togithub.com/vivaxy) Thank you everyone! 💯 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/X-oss-byte/Nextjs).
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fix potential ReDoS
Reported in https://www.huntr.dev/bounties/ebd7b78f-8501-4598-8dbb-81bcd8a8a672
Please validate the above huntr link by clicking on validate button and also please confirm the fix once it got merged. Thank you.