Skip to content
OpenAdvisories
High · 7.5 Public exploit CVE-2022-24785 EUVD-2022-1677GHSA-8hfj-j24r-96c4

Path Traversal in Moment.js

Published Apr 4, 2022 · Updated Nov 3, 2025 · Assigned by GitHub_M

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

VendorProductAffectedFixed
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.

ReleasePackageFixed inAdvisory
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
ReleasePackageFixed inAdvisory
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)
ReleasePackageFixed inAdvisory
Ubuntu Pro 16.04 LTS node-moment No fix yet —
ReleasePackageFixed inAdvisory
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)
ReleasePackageFixed inAdvisory
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.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 1 repository

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Affected packages

EcosystemPackageAffectedFixedRecord
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

References