Skip to main content
Public proof of conceptFix available

CVE-2022-24785

A public proof of concept exists; no exploitation attested.

  • Published2022-04-04
  • WeaknessCWE-22 · CWE-27

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

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.

Timeline

dates in UTC
  1. 2022-04-0417:15CVE publishedNVD

Versions per branch

NVD · OSV
Fedoraproject fedora
BranchAffectedFixed in
35.x= 35no fix published
36.x= 36no fix published
Momentjs moment
BranchAffectedFixed in
2.29≥ 1.0.1, < 2.29.22.29.2
2.29< 2.29.22.29.2
Debian debian linux
BranchAffectedFixed in
10.0= 10.0no fix published

2 more products in the sources.

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Products declared by the CNA1 product

As GitHub_M, the CNA that assigned this CVE, declared them in the CVE record; versions as written.

  • moment
    Affected
    • = >= 1.0.1, < 2.29.2no fix stated

Source: the CNA record (CVE Program), © The MITRE Corporation,CVE terms of useCVE recordupdated 2023-01-31

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • @rootio/momentRoot:npmall versions · fixed in 2.27.0-root.io.1
  • @rootio/momentRoot:npmall versions · fixed in 2.0.0-root.io.2
  • @rootio/momentRoot:npmall versions · fixed in 2.0.0-root.io.3
  • @rootio/momentRoot:npmall versions · fixed in 2.0.0-root.io.4
  • @rootio/momentRoot:npmall versions · fixed in 2.24.0-root.io.2
  • @rootio/momentRoot:npmall versions · fixed in 2.24.0-root.io.3
  • @rootio/momentRoot:npmall versions · fixed in 2.26.0-root.io.2
  • @rootio/momentRoot:npmall versions · fixed in 2.27.0-root.io.2

72 more package ranges on OSV.dev

Vendor advisories

  • CVE-2022-24785 Red Hat Product Security855 products fixed · 93 known affected

    Moment.js: Path traversal in moment.locale

    kiali as a component of OpenShift Service Mesh 2.0 · kiali.src as a component of OpenShift Service Mesh 2.0 · servicemesh-grafana as a component of OpenShift Service Mesh 2.0 · +90 more

  • RHSA-2026:100741 Red Hat Product Security112 products fixed

    Red Hat Security Advisory: Red Hat OpenShift Data Foundation 5.0.0 security, enhancement & bug fix update

  • RHSA-2025:4437 Red Hat Product Security54 products fixed

    Red Hat Security Advisory: Red Hat JBoss Enterprise Application Platform 7.3.13 security update

  • RHSA-2025:4226 Red Hat Product Security34 products fixed

    Red Hat Security Advisory: Red Hat JBoss Enterprise Application Platform 7.1.10 on RHEL 7 security update

  • RHSA-2023:3954 Red Hat Product Security1 product fixed

    Red Hat Security Advisory: Red Hat Fuse 7.12 release and security update

  • RHSA-2023:3642 Red Hat Product Security3 products fixed

    Red Hat Security Advisory: Red Hat Ceph Storage 6.1 Container security and bug fix update

19 more advisories

Full record on NVD

Fix

  1. Vendor fix Red Hat Product Security RHSA-2026:100741 · 112 productsBefore applying this update, make sure all previously released errata relevant to your system have been applied. For details on how to apply this update, refer to: https://docs.redhat.com/en/documentation/red_hat_openshift_data_foundation/5.0/html/updating_openshift_data_foundation/updating-ocs-t…
  2. Vendor fix Red Hat Product Security RHSA-2025:4437 · 54 productsBefore applying this update, ensure all previously released errata relevant to your system have been applied. Also, back up your existing installation, including all applications, configuration files, databases and database settings. For details on how to apply this update, refer to: https://access…
  3. Vendor fix Red Hat Product Security RHSA-2023:3954 · 1 productBefore applying this update, make sure all previously released errata relevant to your system have been applied. For details on how to apply this update, refer to: https://access.redhat.com/articles/11258
  4. Vendor fix Red Hat Product Security RHSA-2023:3642 · 3 productsFor details on how to apply this update, see Upgrade a Red Hat Ceph Storage cluster using cephadm in the Red Hat Storage Ceph Upgrade Guide.(https://access.redhat.com/documentation/en-us/red_hat_ceph_storage)
  5. Vendor fix Red Hat Product Security RHSA-2023:0076 · 617 productsFor details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258
  6. Vendor fix Red Hat Product Security RHSA-2022:8652 · 1 productBefore applying the update, back up your existing installation, including all applications, configuration files, databases and database settings, and so on. Installation instructions are available from the Fuse 7.11.1 product documentation page: https://access.redhat.com/documentation/en-us/red_ha…

Advisories and patches

Detection

read 2026-11-01 01:02 UTC
Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

  • CISA-ADPSSVC decisionnone2025-04-23
  • CNACVSS 3.17.5known since 2026-10-23
  • NVDCVSS 3.17.5read 2026-10-23
  • NVDCVSS 2.05read 2026-10-23
  • CNAweakness (CWE)CWE-22, CWE-27known since 2026-10-23
  • NVDweakness (CWE)CWE-22read 2026-10-23
  • FIRST EPSSEPSS score5.4 %read 2026-12-04
  • PoC-in-GitHubproof of concept1known since 2026-11-01
  • OSVaffected packages—
  • GitHub AdvisoriesadvisoryHigh2022-04-04

Identifiers

Technical details

CVSS v3 vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Published
2022-04-04
Last modified
2025-11-03
NVD status
Modified
GitHub advisory
GHSA-8hfj-j24r-96c4

Frequently asked questions

What is CVE-2022-24785?

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.

Is CVE-2022-24785 actively exploited?

Active exploitation of CVE-2022-24785 has not been confirmed. Its EPSS score was 5.4% on 2026-12-03, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2022-24785?

CVE-2022-24785 has a CVSS v3 base score of 7.5 (High severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N.

Running moment? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website checks · 250 API requests/month

Sources for this record