Skip to content
Fencer Vulns
high 7.5

CVE-2022-24785 in the critical feed json

Path Traversal in Moment.js

published 2022-04-04 4 y ago modified 2026-09-10 1 mo ago also GHSA-8hfj-j24r-96c4 , EUVD-2022-1677

cvss
7.5
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
13.8%
EPSS 13.8% chance of exploitation in 30 days, percentile 96%
public exploits
0
none known

Summary

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.

Patch / fix

  • npm moment 2.29.2
  • nuget Moment.js 2.29.2
  • momentjs moment 2.29.2
  • tenable tenable.sc 5.21.0
  • node-moment Debian 14, Debian 13, Debian 12 2.29.2+ds-1

debian advisories DEBIAN-CVE-2022-24785

  • node-moment Ubuntu 18.04 LTS 2.20.1+ds-1ubuntu0.1
  • node-moment Ubuntu 20.04 LTS 2.24.0+ds-2ubuntu0.1
  • node-moment Ubuntu 22.04 LTS 2.29.1+ds-3ubuntu0.2

ubuntu advisories UBUNTU-CVE-2022-24785

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • rh-sso7-keycloak red hat single sign on 7.6 18.0.6-1.redhat_00001.1.el7sso
  • rh-sso7-keycloak-server red hat single sign on 7.6 18.0.6-1.redhat_00001.1.el7sso
  • rh-sso7-keycloak red hat single sign on 7.6 18.0.6-1.redhat_00001.1.el8sso
  • rh-sso7-keycloak-server red hat single sign on 7.6 18.0.6-1.redhat_00001.1.el8sso
  • rh-sso7-keycloak red hat single sign on 7.6 18.0.6-1.redhat_00001.1.el9sso
  • rh-sso7-keycloak-server red hat single sign on 7.6 18.0.6-1.redhat_00001.1.el9sso
  • servicemesh service mesh 2.1 2.1.5-1.el8
  • servicemesh-cni service mesh 2.1 2.1.5-1.el8

red hat advisories RHSA-2025:4437RHSA-2025:4226RHSA-2023:1043RHSA-2023:1044RHSA-2023:1045RHSA-2022:6277

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2022-24785 updated cvss 7.5

Moment.js: Path traversal in moment.locale

  • Red Hat OpenShift Service Mesh 2.0 kiali, servicemesh-grafana, servicemesh-grafana-prometheus
    affected: workaround, no fix available “Sanitize the user-provided locale name before passing it to Moment.js.”
  • Red Hat OpenShift Service Mesh 2.1 servicemesh-grafana
    affected: workaround, no fix planned “Sanitize the user-provided locale name before passing it to Moment.js.”
  • Red Hat 3scale API Management Platform 2 3scale-amp2/apicast-rhel9-operator, 3scale-amp2/3scale-apicast-operator-bundle Red Hat Advanced Cluster Management for Kubernetes 2 rhacm2/console, grc-ui-container, rhacm2/console-api, grc-ui-api-container, rhacm2/search-ui-rhel8, rhacm2/console-ui-rhel8, +5 more Red Hat build of Apicurio Registry 2 momentjs
    affected: workaround, no fix available “Sanitize the user-provided locale name before passing it to Moment.js.”
  • Red Hat Ceph Storage 3 grafana Red Hat Ceph Storage 4 ceph, librbd1, librgw2, rbd-nbd, ceph-mds, ceph-mgr, +28 more
    affected: workaround, no fix planned “Sanitize the user-provided locale name before passing it to Moment.js.”
  • Red Hat Ceph Storage 5 rhceph/rhceph-5-dashboard-rhel8
    affected: workaround, no fix available “Sanitize the user-provided locale name before passing it to Moment.js.”
  • Red Hat Data Grid 8 momentjs Red Hat Enterprise Linux 8 389-ds-base, cockpit-389-ds, python3-lib389, 389-ds-base-libs, 389-ds-base-snmp, 389-ds-base-legacy-tools
    affected: workaround, no fix planned “Sanitize the user-provided locale name before passing it to Moment.js.”
  • Red Hat Integration Camel K 1 momentjs
    affected: workaround, no fix available “Sanitize the user-provided locale name before passing it to Moment.js.”
  • Red Hat Integration Data Virtualisation Operator momentjs Red Hat Integration Service Registry momentjs Red Hat JBoss Data Grid 7 momentjs Red Hat OpenShift Container Platform 3.11 openshift3/grafana, openshift3/prometheus, openshift3/ose-console Red Hat Openshift Container Storage 4 ceph, ocs4/mcg-core-rhel8
    affected: workaround, no fix planned “Sanitize the user-provided locale name before passing it to Moment.js.”
show 19 more
  • Red Hat Openshift Data Foundation 4 ceph, noobaa-core-container
    affected: workaround, no fix available, no fix planned “Sanitize the user-provided locale name before passing it to Moment.js.”
  • Red Hat OpenShift distributed tracing 2 rhosdt/jaeger-agent-rhel8 Red Hat OpenShift GitOps openshift-gitops-1/argocd-rhel8 Red Hat Satellite 6 qpid-dispatch, libqpid-dispatch, qpid-dispatch-tools, qpid-dispatch-router
    affected: workaround, no fix available “Sanitize the user-provided locale name before passing it to Moment.js.”
  • Red Hat Storage 3 grafana Red Hat Virtualization 4 ovirt-engine-api-explorer
    affected: workaround, no fix planned “Sanitize the user-provided locale name before passing it to Moment.js.”
  • Red Hat Middleware Containers for OpenShift rh-sso-7/sso76-openshift-rhel8 7.6-20
    fixed: vendor fix “Sanitize the user-provided locale name before passing it to Moment.js.” RHSA-2023:1047
  • Red Hat OpenShift Service Mesh 2.0 servicemesh-prometheus 2.14.0-18.el8.1
    fixed: vendor fix “Sanitize the user-provided locale name before passing it to Moment.js.” RHSA-2022:6272
  • Red Hat OpenShift Service Mesh 2.1 servicemesh-prometheus 2.23.0-9.el8, openshift-service-mesh/kiali-rhel8 1.36.10-2
    fixed: vendor fix “Sanitize the user-provided locale name before passing it to Moment.js.” RHSA-2022:5006
  • Red Hat Ceph Storage 5.3 MON ceph 16.2.10-94.el8cp, cephadm 16.2.10-94.el8cp, librbd1 16.2.10-94.el8cp, librgw2 16.2.10-94.el8cp, ceph-mgr 16.2.10-94.el8cp, ceph-mon 16.2.10-94.el8cp, +22 more Red Hat Ceph Storage 5.3 OSD ceph 16.2.10-94.el8cp, librbd1 16.2.10-94.el8cp, librgw2 16.2.10-94.el8cp, ceph-osd 16.2.10-94.el8cp, ceph-base 16.2.10-94.el8cp, ceph-test 16.2.10-94.el8cp, +12 more Red Hat Ceph Storage 5.3 Tools ceph 16.2.10-94.el8cp, ceph 16.2.10-94.el9cp, cephadm 16.2.10-94.el8cp, cephadm 16.2.10-94.el9cp, librbd1 16.2.10-94.el8cp, librbd1 16.2.10-94.el9cp, +43 more
    fixed: vendor fix “Sanitize the user-provided locale name before passing it to Moment.js.” RHSA-2023:0076
  • Red Hat Ceph Storage 6.1 Tools rhceph/rhceph-6-dashboard-rhel9 6-75
    fixed: vendor fix “Sanitize the user-provided locale name before passing it to Moment.js.” RHSA-2023:3642
  • Red Hat Fuse 7.11.1
    fixed: vendor fix “Sanitize the user-provided locale name before passing it to Moment.js.” RHSA-2022:8652
  • Red Hat Fuse 7.12
    fixed: vendor fix “Sanitize the user-provided locale name before passing it to Moment.js.” RHSA-2023:3954
  • Red Hat JBoss EAP 7.4 for RHEL 7 Server eap7-hal-console 3.3.12-1.Final_redhat_00001.1.el7eap
    fixed: vendor fix “Sanitize the user-provided locale name before passing it to Moment.js.” RHSA-2022:4918
  • Red Hat JBoss EAP 7.4 for RHEL 8 eap7-hal-console 3.3.12-1.Final_redhat_00001.1.el8eap
    fixed: vendor fix “Sanitize the user-provided locale name before passing it to Moment.js.” RHSA-2022:4919
  • Red Hat JBoss Enterprise Application Platform hal-console 3.3.12.Final-redhat-00001
    fixed: vendor fix “Sanitize the user-provided locale name before passing it to Moment.js.” RHSA-2022:4922
  • Red Hat JBoss Enterprise Application Platform 7.1 EUS for RHEL 7 Server eap7-jsoup 1.14.2-1.redhat_00002.1.ep7.el7, eap7-wildfly 7.1.10-2.GA_redhat_00002.1.ep7.el7, eap7-woodstox-core 5.0.3-2.redhat_00002.1.ep7.el7, eap7-xml-security 2.0.10-2.redhat_00002.1.ep7.el7, eap7-undertow 1.4.18-14.SP13_redhat_00001.1.ep7.el7, eap7-artemis-native 1.5.5.016-1.redhat_00001.1.ep7.el7, +19 more
    fixed: vendor fix “Sanitize the user-provided locale name before passing it to Moment.js.” RHSA-2025:4226
  • Red Hat JBoss Enterprise Application Platform 7.3 EUS for RHEL 7 Server eap7-gson 2.8.9-1.redhat_00001.1.el7eap, eap7-wildfly 7.3.13-4.GA_redhat_00002.1.el7eap, eap7-woodstox-core 6.4.0-1.redhat_00001.1.el7eap, eap7-activemq-artemis 2.9.0-10.redhat_00021.1.el7eap, eap7-hal-console 3.2.18-1.Final_redhat_00001.1.el7eap, eap7-wildfly-modules 7.3.13-4.GA_redhat_00002.1.el7eap, +41 more
    fixed: vendor fix “Sanitize the user-provided locale name before passing it to Moment.js.” RHSA-2025:4437
  • Red Hat Single Sign-On 7
    fixed: vendor fix “Sanitize the user-provided locale name before passing it to Moment.js.” RHSA-2023:1049
  • Red Hat Single Sign-On 7.6 for RHEL 7 Server rh-sso7-keycloak 18.0.6-1.redhat_00001.1.el7sso, rh-sso7-keycloak-server 18.0.6-1.redhat_00001.1.el7sso
    fixed: vendor fix “Sanitize the user-provided locale name before passing it to Moment.js.” RHSA-2023:1043
  • Red Hat Single Sign-On 7.6 for RHEL 8 rh-sso7-keycloak 18.0.6-1.redhat_00001.1.el8sso, rh-sso7-keycloak-server 18.0.6-1.redhat_00001.1.el8sso
    fixed: vendor fix “Sanitize the user-provided locale name before passing it to Moment.js.” RHSA-2023:1044
  • Red Hat Single Sign-On 7.6 for RHEL 9 rh-sso7-keycloak 18.0.6-1.redhat_00001.1.el9sso, rh-sso7-keycloak-server 18.0.6-1.redhat_00001.1.el9sso
    fixed: vendor fix “Sanitize the user-provided locale name before passing it to Moment.js.” RHSA-2023:1045

2 more fixed, 17 more not affected in the full advisory

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
none
Automatable
yes
Technical impact
partial
Assessed
18 mo ago

Exploit prediction

13.84% chance of exploitation in the next 30 days, higher than 96% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.1 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
NVD 3.1 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
NVD 2.0 5.0 AV:N/AC:L/Au:N/C:N/I:P/A:N
GitHub 3.1 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Affected packages

ecosystem package affected fixed in
npm moment
<2.29.2
2.29.2
nuget Moment.js
<2.29.2
2.29.2

Affected products

  • moment moment

Classification

Weakness
  • CWE-22 Improper Limitation of a Pathname to a Restricted Directory
  • CWE-27 Path Traversal: 'dir/../../filename'

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.