PT-2022-16878 · Npm+4 · Moment.Js+5
Ichernev
·
Published
2022-04-04
·
Updated
2026-06-04
·
CVE-2022-24785
CVSS v2.0
7.8
High
| Vector | AV:N/AC:L/Au:N/C:N/I:C/A:N |
Name of the Vulnerable Software and Affected Versions
Moment.js versions 1.0.1 through 2.29.1
Description
A path traversal vulnerability impacts npm (server) users of Moment.js, especially if a user-provided locale string is directly used to switch moment locale. This issue allows an unauthenticated attacker to provide a filesystem path as invalid input. The problem is patched in version 2.29.2.
Recommendations
For versions 1.0.1 through 2.29.1, update to version 2.29.2 to resolve the issue.
As a temporary workaround, sanitize the user-provided locale name before passing it to Moment.js.
Exploit
Fix
Path traversal
Found an issue in the description? Have something to add? Feel free to write us 👾
Related Identifiers
Affected Products
Astra Linux
Bitbucket
Confluence
Linuxmint
Moment.Js
Ubuntu