cve.bz

CVE-2022-24785 Path traversal

7.5 highEPSS 14%Fix available

High (7.5). EPSS 14% estimated probability of exploitation activity in the next 30 days. Fixed in moment 2.29.2.

On this page
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.

Severity

CVSS 3.1

7.5 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
EPSS
14% (unchanged from 14% a week ago; 14% 30 days ago) estimated probability of exploitation activity in the next 30 days; 97th percentile. Scored 2026-11-21. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: yes · Technical impact: partial, assessed 2025-04-23. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-22 Improper Limitation of a Pathname to a Restricted Directory (Path traversal)
CWE-27 Path Traversal: 'dir/../../filename'
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2022-24785 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-24785?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-24785?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2022-24785 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
momentjs:momentfrom 1.0.1 before 2.29.2
tenable:tenable.scbefore 5.21.0
fedoraproject:fedora35
fedoraproject:fedora36
debian:debian_linux10.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-8hfj-j24r-96c4npmmoment<2.29.22.29.2
GHSA-8hfj-j24r-96c4NuGetMoment.js<2.29.22.29.2

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian10node-moment2.24.0+ds-1+deb10u1DLA-3295-1
Debian12, 13, 14node-moment2.29.2+ds-1DEBIAN-CVE-2022-24785
Ubuntu16.04:LTSnikolano fix listedUBUNTU-CVE-2022-24785
Ubuntu18.04:LTSnode-moment2.20.1+ds-1ubuntu0.1UBUNTU-CVE-2022-24785 USN-5559-1
Ubuntu20.04:LTSnode-moment2.24.0+ds-2ubuntu0.1UBUNTU-CVE-2022-24785 USN-5559-1
Ubuntu22.04:LTSnode-moment2.29.1+ds-3ubuntu0.2UBUNTU-CVE-2022-24785 USN-5559-1
UbuntuPro:16.04:LTSnode-moment2.11.0+ds-1ubuntu0.1~esm2UBUNTU-CVE-2022-24785 USN-9117-1
Red Hatceph_storage:5.3::el8ceph, cephadm, librbd1 and 67 more2:16.2.10-94.el8cpRHSA-2023:0076
Red Hatceph_storage:5.3::el9ceph, cephadm, librbd1 and 50 more2:16.2.10-94.el9cpRHSA-2023:0076
Red Hatjboss_enterprise_application_platform:7.4::el7eap7-activemq-artemis, eap7-activemq-artemis-ra, eap7-activemq-artemis-cli and 13 more0:2.16.0-9.redhat_00042.1.el7eapRHSA-2022:4918
Red Hatjboss_enterprise_application_platform:7.4::el7eap7-h2database0:1.4.197-2.redhat_00004.1.el7eapRHSA-2022:4918
Red Hatjboss_enterprise_application_platform:7.4::el7eap7-hal-console0:3.3.12-1.Final_redhat_00001.1.el7eapRHSA-2022:4918
Red Hatjboss_enterprise_application_platform:7.4::el7eap7-jackson-databind0:2.12.6.1-1.redhat_00003.1.el7eapRHSA-2022:4918
Red Hatjboss_enterprise_application_platform:7.4::el7eap7-jboss-xnio-base0:3.8.7-1.SP1_redhat_00001.1.el7eapRHSA-2022:4918
Red Hatjboss_enterprise_application_platform:7.4::el7eap7-netty, eap7-netty-all, eap7-netty-codec and 25 more0:4.1.72-4.Final_redhat_00001.1.el7eapRHSA-2022:4918
Red Hatjboss_enterprise_application_platform:7.4::el7eap7-undertow0:2.2.17-2.SP4_redhat_00001.1.el7eapRHSA-2022:4918
Red Hatjboss_enterprise_application_platform:7.4::el7eap7-wildfly, eap7-wildfly-modules, eap7-wildfly-javadocs and 2 more0:7.4.5-3.GA_redhat_00001.1.el7eapRHSA-2022:4918
Red Hatjboss_enterprise_application_platform:7.4::el7eap7-wildfly-http-client, eap7-wildfly-http-ejb-client, eap7-wildfly-http-client-common and 2 more0:1.1.11-1.SP1_redhat_00001.1.el7eapRHSA-2022:4918
Red Hatjboss_enterprise_application_platform:7.4::el7eap7-xerces-j20:2.12.0-3.SP04_redhat_00001.1.el7eapRHSA-2022:4918
31 more for Red Hat in the JSON and on Red Hat's page.

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

In Quay 3.10 and above, no version of affected momentjs is present.

Red Hat's mitigation

Sanitize the user-provided locale name before passing it to Moment.js.

ProductPackageStateAdvisory
OpenShift Service Mesh 2.0servicemesh-prometheus-0:2.14.0-18.el8.1Fixed 2022-08-31RHSA-2022:6272
OpenShift Service Mesh 2.1openshift-service-mesh/kiali-rhel8:1.36.10-2Fixed 2022-06-13RHSA-2022:5006
OpenShift Service Mesh 2.1servicemesh-prometheus-0:2.23.0-9.el8Fixed 2022-08-31RHSA-2022:6277
Red Hat Ceph Storage 5.3ceph-2:16.2.10-94.el8cpFixed 2023-01-11RHSA-2023:0076
Red Hat Ceph Storage 6.1rhceph/rhceph-6-dashboard-rhel9:6-75Fixed 2023-06-15RHSA-2023:3642
Red Hat Fuse 7.11.1Moment.jsFixed 2022-11-28RHSA-2022:8652
Red Hat Fuse 7.12Fixed 2023-06-29RHSA-2023:3954
Red Hat JBoss Enterprise Application Platformorg.jboss.hal/hal-console:3.3.12.Final-redhat-00001Fixed 2022-06-06RHSA-2022:4922
Red Hat JBoss Enterprise Application Platform 7.1 EUS for RHEL 7eap7-activemq-artemis-0:1.5.5.016-1.redhat_00001.1.ep7.el7Fixed 2025-04-28RHSA-2025:4226
Red Hat JBoss Enterprise Application Platform 7.1 EUS for RHEL 7eap7-artemis-native-1:1.5.5.016-1.redhat_00001.1.ep7.el7Fixed 2025-04-28RHSA-2025:4226
OpenShift Service Mesh 2.0kialiAffected
OpenShift Service Mesh 2.0servicemesh-grafanaAffected
OpenShift Service Mesh 2.1servicemesh-grafanaWill not fix
Red Hat 3scale API Management Platform 23scale-amp2/apicast-rhel7-operatorAffected
Red Hat 3scale API Management Platform 23scale-amp2/apicast-rhel7-operator-metadataAffected
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/application-ui-rhel8Affected
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/console-api-rhel8Affected
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/console-header-rhel8Fix deferred
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/console-rhel8Affected
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/console-ui-rhel8Fix deferred
69 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2022-24785.

Attack patterns (CAPEC)

  • CAPEC-64 Using Slashes and URL Encoding Combined to Bypass Validation Logic Likelihood: High · Severity: High
  • CAPEC-76 Manipulating Web Input to File System Calls Likelihood: High · Severity: Very High
  • CAPEC-78 Using Escaped Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-79 Using Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-126 Path Traversal Likelihood: High · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON