Advisories for Npm/Moment package

2026

moment vulnerable to Path Traversal via crafted non-string locale name

moment before 2.31.0 is vulnerable to path traversal in moment.locale(). When an application passes a non-string, attacker-influenced value to moment.locale(), a specially crafted object can bypass the locale name validation and cause moment to load a file from an attacker-controlled path. This is a further bypass of the validation added in 2.29.2 for CVE-2022-24785. This affects server-side (npm) users only. Plain string input is not affected: the existing validation correctly …

2022

Moment.js vulnerable to Inefficient Regular Expression Complexity

using string-to-date parsing in moment (more specifically rfc2822 parsing, which is tried by default) has quadratic (N^2) complexity on specific inputs noticeable slowdown is observed with inputs above 10k characters users who pass user-provided strings without sanity length checks to moment constructor are vulnerable to (Re)DoS attacks

2018
2017