bignumber: parseFixed now contains a ReDoS since a9cdbe1238c149a7167c6bb1a78f314805b52755
See original GitHub issueThe new regex introduced in a9cdbe1238c149a7167c6bb1a78f314805b52755 contains an IDA, and could cause a ReDoS on some crafted input.
import { parseFixed } from '@ethersproject/bignumber'
console.log(parseFixed('0.' + '0'.repeat(8e6) + '1')) // hangs
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Developers - bignumber: parseFixed now contains a ReDoS since ...
The new regex introduced in a9cdbe1238c149a7167c6bb1a78f314805b52755 contains an IDA, and could cause a ReDoS on some crafted input. import { parseFixed } ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks! This will be fixed with #2016, which is removing the regex entirely.
Huge thanks for the info on ReDoS though, I need to spend more time understanding the intricacies of it.
Reminds me of the quote: “You have problem and think to yourself, ‘I know! I can use a regular expression’. Now you have two problems.” 😃
This is now fixed.