This repository was archived by the owner on Jan 19, 2023. It is now read-only.
This repository was archived by the owner on Jan 19, 2023. It is now read-only.
Missing CWE-185 for Moment.js #310
Open
Description
Advisory details
URL: https://github.com/moment/moment/security/advisories/GHSA-wc69-rhjr-hc9g
format: npm, nuget
namespace: moment, moment.js
name: moment
versions: >= 2.18.0, < 2.29.4
More information
There is an inefficient regular expression complexity in moment which can lead to regular expression denial of service (ReDoS) with the use of a specially crafted input. The problem is patched in 2.29.4
The issue is rooted in the code that removes legacy comments (stuff inside parenthesis) from strings during rfc2822 parsing. moment("(".repeat(500000))
will take a few minutes to process, which is unacceptable.