moment@2.28.0 vulnerabilities

Parse, validate, manipulate, and display dates

Direct Vulnerabilities

Known vulnerabilities in the moment package. This does not include vulnerabilities belonging to this package’s dependencies.

Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.
Fix for free
Vulnerability Vulnerable Version
  • H
Regular Expression Denial of Service (ReDoS)

moment is a lightweight JavaScript date library for parsing, validating, manipulating, and formatting dates.

Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) via the preprocessRFC2822() function in from-string.js, when processing a very long crafted string (over 10k characters).

How to fix Regular Expression Denial of Service (ReDoS)?

Upgrade moment to version 2.29.4 or higher.

>=2.18.0 <2.29.4
  • H
Directory Traversal

moment is a lightweight JavaScript date library for parsing, validating, manipulating, and formatting dates.

Affected versions of this package are vulnerable to Directory Traversal when a user provides a locale string which is directly used to switch moment locale.

How to fix Directory Traversal?

Upgrade moment to version 2.29.2 or higher.

<2.29.2