# CVE-2022-24785: node-moment: Moment.js is a JavaScript date library for parsing, validating, manipulating, and formatting dates

CVE-2022-24785 is fixed in 2 products on 1 platform, first by DEBIAN-CVE-2022-24785, released April 4, 2022. It is not reported as exploited. Patch Radar priority: High.

- Web page: https://patchblox.com/security/cve/CVE-2022-24785
- Priority: High
- CVSS: 7.5 (high)
- EPSS: 0.1384
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Apr 4, 2022

## Description

Moment.js is a JavaScript date library for parsing, validating, manipulating, and formatting dates. A path traversal vulnerability impacts npm (server) users of Moment.js between versions 1.0.1 and 2.29.1, especially if a user-provided locale string is directly used to switch moment locale. This problem is patched in 2.29.2, and the patch can be applied to all affected versions. As a workaround, sanitize the user-provided locale name before passing it to Moment.js.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | libjs-moment Ubuntu 18.04.6 LTS (bionic) | 2.20.1+ds-1ubuntu0.1 | [libjs-moment 2.20.1+ds-1ubuntu0.1](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-libjs-moment-2.20.1-ds-1ubuntu0.1.md) | Jul 6, 2022 |
| Linux | libjs-moment Ubuntu 20.04 LTS (focal) | 2.24.0+ds-2ubuntu0.1 | [libjs-moment 2.24.0+ds-2ubuntu0.1](https://patchblox.com/security/data/fix/linux/ubuntu-focal-libjs-moment-2.24.0-ds-2ubuntu0.1.md) | Jul 6, 2022 |
| Linux | libjs-moment Ubuntu 22.04.1 LTS (jammy) | 2.29.1+ds-3ubuntu0.2 | [libjs-moment 2.29.1+ds-3ubuntu0.2](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-libjs-moment-2.29.1-ds-3ubuntu0.2.md) | Jul 6, 2022 |
| Linux | node-moment Debian 12.15 (bookworm) | 2.29.2+ds-1 | [DEBIAN-CVE-2022-24785](https://patchblox.com/security/data/fix/linux/debian-cve-2022-24785.md) | Apr 4, 2022 |
| Linux | node-moment Debian 13.5 (trixie) | 2.29.2+ds-1 | [DEBIAN-CVE-2022-24785](https://patchblox.com/security/data/fix/linux/debian-cve-2022-24785.md) | Apr 4, 2022 |
| Linux | node-moment Debian 14 | 2.29.2+ds-1 | [DEBIAN-CVE-2022-24785](https://patchblox.com/security/data/fix/linux/debian-cve-2022-24785.md) | Apr 4, 2022 |
| Linux | node-moment Ubuntu 18.04.6 LTS (bionic) | 2.20.1+ds-1ubuntu0.1 | [node-moment 2.20.1+ds-1ubuntu0.1](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-node-moment-2.20.1-ds-1ubuntu0.1.md) | Jul 6, 2022 |
| Linux | node-moment Ubuntu 20.04 LTS (focal) | 2.24.0+ds-2ubuntu0.1 | [node-moment 2.24.0+ds-2ubuntu0.1](https://patchblox.com/security/data/fix/linux/ubuntu-focal-node-moment-2.24.0-ds-2ubuntu0.1.md) | Jul 6, 2022 |
| Linux | node-moment Ubuntu 22.04.1 LTS (jammy) | 2.29.1+ds-3ubuntu0.2 | [node-moment 2.29.1+ds-3ubuntu0.2](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-node-moment-2.29.1-ds-3ubuntu0.2.md) | Jul 6, 2022 |

---

Data as of 2026-11-09T01:18:40Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
