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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| moment | moment | >= 1.0.1, < 2.29.2 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | node-moment | 2.29.2+ds-1 | — |
| Debian 13 | node-moment | 2.29.2+ds-1 | — |
| Debian 12 | node-moment | 2.29.2+ds-1 | — |
| Debian 10 | node-moment | 2.24.0+ds-1+deb10u1 | DLA-3295-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 22.04 LTS | node-moment | 2.29.1+ds-3ubuntu0.2 | USN-5559-1 |
| Ubuntu 20.04 LTS | node-moment | 2.24.0+ds-2ubuntu0.1 | USN-5559-1 |
| Ubuntu 18.04 LTS | node-moment | 2.20.1+ds-1ubuntu0.1 | USN-5559-1 |
| Ubuntu 16.04 LTS | nikola | No fix yet | — |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 16.04 LTS | node-moment | No fix yet | — |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Red Hat Service Mesh 2 | servicemesh +7 | 2.1.5-1.el8 | RHSA-2022:6277 |
| Red Hat Service Mesh 2 | servicemesh-prometheus | 2.14.0-18.el8.1 | RHSA-2022:6277, RHSA-2022:6272 |
| Red Hat Single Sign On 7 | rh-sso7-keycloak +1 | 18.0.6-1.redhat_00001.1.el7sso | RHSA-2023:1045, RHSA-2023:1044, RHSA-2023:1043 |
| Red Hat Jboss Enterprise Application Platform Eus 7 | eap7-activemq-artemis +15 | 1.5.5.016-1.redhat_00001.1.ep7.el7 | RHSA-2025:4437, RHSA-2025:4226 |
| Red Hat Jboss Enterprise Application Platform Eus 7 | eap7-activemq-artemis-tools | 2.9.0-10.redhat_00021.1.el7eap | RHSA-2025:4437 |
| Red Hat Jboss Enterprise Application Platform Eus 7 | eap7-artemis-native +1 | 1:1.5.5.016-1.redhat_00001.1.ep7.el7 | RHSA-2025:4226 |
| Red Hat Jboss Enterprise Application Platform Eus 7 | eap7-gson | 2.8.9-1.redhat_00001.1.el7eap | RHSA-2025:4437 |
| Red Hat Jboss Enterprise Application Platform Eus 7 | eap7-hal-console | 3.2.18-1.Final_redhat_00001.1.el7eap | RHSA-2025:4437 |
| Red Hat Jboss Enterprise Application Platform Eus 7 | eap7-jboss-server-migration +21 | 1.7.2-14.Final_redhat_00015.1.el7eap | RHSA-2025:4437 |
| Red Hat Jboss Enterprise Application Platform Eus 7 | eap7-jboss-xnio-base | 3.5.11-1.Final_redhat_00001.1.ep7.el7 | RHSA-2025:4437, RHSA-2025:4226 |
| Red Hat Jboss Enterprise Application Platform Eus 7 | eap7-jsoup | 1.14.2-1.redhat_00002.1.ep7.el7 | RHSA-2025:4226 |
| Red Hat Jboss Enterprise Application Platform Eus 7 | eap7-undertow | 1.4.18-14.SP13_redhat_00001.1.ep7.el7 | RHSA-2025:4226 |
| Red Hat Jboss Enterprise Application Platform Eus 7 | eap7-wildfly +1 | 7.1.10-2.GA_redhat_00002.1.ep7.el7 | RHSA-2025:4437, RHSA-2025:4226 |
| Red Hat Jboss Enterprise Application Platform Eus 7 | eap7-wildfly-javadocs +2 | 7.3.13-4.GA_redhat_00002.1.el7eap | RHSA-2025:4437 |
| Red Hat Jboss Enterprise Application Platform Eus 7 | eap7-woodstox-core | 5.0.3-2.redhat_00002.1.ep7.el7 | RHSA-2025:4437, RHSA-2025:4226 |
| Red Hat Jboss Enterprise Application Platform Eus 7 | eap7-xml-security | 2.0.10-2.redhat_00002.1.ep7.el7 | RHSA-2025:4226 |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Red Hat JBoss EAP 7 | eap7-activemq-artemis +15 | 2.16.0-9.redhat_00042.1.el7eap | RHSA-2022:4919, RHSA-2022:4918 |
| Red Hat JBoss EAP 7 | eap7-h2database | 1.4.197-2.redhat_00004.1.el7eap | RHSA-2022:4919, RHSA-2022:4918 |
| Red Hat JBoss EAP 7 | eap7-hal-console | 3.3.12-1.Final_redhat_00001.1.el7eap | RHSA-2022:4919, RHSA-2022:4918 |
| Red Hat JBoss EAP 7 | eap7-jackson-databind | 2.12.6.1-1.redhat_00003.1.el7eap | RHSA-2022:4919, RHSA-2022:4918 |
| Red Hat JBoss EAP 7 | eap7-jboss-xnio-base | 3.8.7-1.SP1_redhat_00001.1.el7eap | RHSA-2022:4919, RHSA-2022:4918 |
| Red Hat JBoss EAP 7 | eap7-netty +27 | 4.1.72-4.Final_redhat_00001.1.el7eap | RHSA-2022:4919, RHSA-2022:4918 |
| Red Hat JBoss EAP 7 | eap7-undertow | 2.2.17-2.SP4_redhat_00001.1.el7eap | RHSA-2022:4919, RHSA-2022:4918 |
| Red Hat JBoss EAP 7 | eap7-wildfly +4 | 7.4.5-3.GA_redhat_00001.1.el7eap | RHSA-2022:4919, RHSA-2022:4918 |
| Red Hat JBoss EAP 7 | eap7-wildfly-http-client +4 | 1.1.11-1.SP1_redhat_00001.1.el7eap | RHSA-2022:4919, RHSA-2022:4918 |
| Red Hat JBoss EAP 7 | eap7-xerces-j2 | 2.12.0-3.SP04_redhat_00001.1.el7eap | RHSA-2022:4919, RHSA-2022:4918 |
| Red Hat Ceph Storage 5 | ceph +43 | 2:16.2.10-94.el8cp | RHSA-2023:0076 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
GitHub 1 repository
-
AnomalousVectors/cve-2022-24785-poc-lab ★ 1 · May 29, 2023
Moment.js vuln lab
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| npm | moment | < 2.29.2 | 2.29.2 | GHSA-8hfj-j24r-96c4 |
| NuGet | Moment.js | < 2.29.2 | 2.29.2 | GHSA-8hfj-j24r-96c4 |
Advisories 16
- RHSA-2023:0076 Red Hat Security Advisory: Red Hat Ceph Storage 5.3 security update and Bug Fix Red Hat Security Advisories (RHSA) · Nov 13, 2026
- WID-SEC-2022-0288 Red Hat OpenShift: Mehrere Schwachstellen BSI CERT-Bund (WID) · Nov 2, 2026
- RHSA-2022:6277 Red Hat Security Advisory: Red Hat OpenShift Service Mesh 2.1.5 security update Red Hat Security Advisories (RHSA) · Oct 15, 2026
- RHSA-2025:4437 Red Hat Security Advisory: Red Hat JBoss Enterprise Application Platform 7.3.13 security update Red Hat Security Advisories (RHSA) · Oct 14, 2026
- RHSA-2025:4226 Red Hat Security Advisory: Red Hat JBoss Enterprise Application Platform 7.1.10 on RHEL 7 security update Red Hat Security Advisories (RHSA) · Oct 14, 2026
- RHSA-2023:1045 Red Hat Security Advisory: Red Hat Single Sign-On 7.6.2 security update on RHEL 9 Red Hat Security Advisories (RHSA) · Oct 13, 2026
- RHSA-2023:1044 Red Hat Security Advisory: Red Hat Single Sign-On 7.6.2 security update on RHEL 8 Red Hat Security Advisories (RHSA) · Oct 13, 2026
- RHSA-2023:1043 Red Hat Security Advisory: Red Hat Single Sign-On 7.6.2 security update on RHEL 7 Red Hat Security Advisories (RHSA) · Oct 13, 2026
- RHSA-2022:6272 Red Hat Security Advisory: Red Hat OpenShift Service Mesh 2.0.11 security update Red Hat Security Advisories (RHSA) · Oct 13, 2026
- RHSA-2022:4919 Red Hat Security Advisory: Red Hat JBoss Enterprise Application Platform 7.4.5 security update on RHEL 8 Red Hat Security Advisories (RHSA) · Oct 13, 2026
- RHSA-2022:4918 Red Hat Security Advisory: Red Hat JBoss Enterprise Application Platform 7.4.5 security update on RHEL 7 Red Hat Security Advisories (RHSA) · Oct 13, 2026
- USN-5559-1 node-moment vulnerabilities Ubuntu Security Notices (USN) · Apr 27, 2026
- DLA-3295-1 node-moment - security update Debian Security (DSA / DLA) · Mar 9, 2026
- WID-SEC-2023-0395 Splunk Splunk Enterprise: Mehrere Schwachstellen BSI CERT-Bund (WID) · Nov 18, 2025
- WID-SEC-2023-0809 IBM QRadar SIEM: Mehrere Schwachstellen BSI CERT-Bund (WID) · Feb 19, 2024
- WID-SEC-2023-0026 IBM Maximo Asset Management: Mehrere Schwachstellen BSI CERT-Bund (WID) · Feb 19, 2023
References
- https://github.com/moment/moment/security/advisories/GHSA-8hfj-j24r-96c4
- https://github.com/moment/moment/commit/4211bfc8f15746be4019bba557e29a7ba83d54c5
- https://www.tenable.com/security/tns-2022-09
- https://security.netapp.com/advisory/ntap-20220513-0006/
- FEDORA-2022-85aa8e5706 vendor-advisory
- FEDORA-2022-35b698150c vendor-advisory
- [debian-lts-announce] 20230130 [SECURITY] [DLA 3295-1] node-moment security update mailing-list