Skip to content
Noroxi
CVE-2022-24785· NVD / CVE Program· CNA GitHub_M

Path Traversal in Moment.js

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.

HighCVSS 7.5 · v3.1—Proof of concept Fix available
Published
Apr 4, 2022
Updated
Jun 17, 2026
EPSS
13.9% · 96th percentile
Follow this CVE

Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.

Report tools

JSON

Action score

34

Monitor

Low priority for now.

CVSS
30 / 40 · 7.5 / 10
CISA KEV
0 / 30 · Not listed
EPSS
4 / 30 · 13.9%

CISA SSVC decision

Exploitation
none
Automatable
yes
Technical impact
partial

Vulnrichment: CISA's decision-tree inputs.

CNA vs NVD score

NVD
7.5
CNA · GitHub_M
7.5
agree

The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.

Noroxi analysis

No Noroxi analysis for this record yet

We don't hand-write analysis for the hundreds of thousands of vulnerabilities in the database; that wouldn't be honest. For notable, high-impact vulnerabilities our team writes the mechanism, detection and remediation steps.

We use this product, ask for help

Affected systems

VendorProduct
momentjsmoment
tenabletenable.sc
netappactive iq
fedoraprojectfedora
debiandebian linux

Affected versions

NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.

  • debian debian linux10.0
  • fedoraproject fedora35
  • fedoraproject fedora36
  • momentjs moment1.0.1 and later · before 2.29.2
  • netapp active iqall versions
  • tenable tenable.scbefore 5.21.0

Versions reported by the vendor

Affected version ranges reported by the assigning authority (GitHub_M). Independent of NVD's CPE analysis and usually ahead of it.

  • moment moment

    • >= 1.0.1, < 2.29.2affected

Package-level exposure

OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.

EcosystemPackageAffected rangeFix
Debian:10node-momentbefore 2.24.0+ds-1+deb10u12.24.0+ds-1+deb10u1
Debian:12node-momentbefore 2.29.2+ds-12.29.2+ds-1
npmmomentbefore 2.29.22.29.2
npmmomentbefore 2.29.22.29.2
NuGetMoment.jsbefore 2.29.22.29.2
Red Hat:ceph_storage:5.3::el8cephbefore 2:16.2.10-94.el8cp2:16.2.10-94.el8cp
Red Hat:ceph_storage:5.3::el8ceph-basebefore 2:16.2.10-94.el8cp2:16.2.10-94.el8cp
Red Hat:ceph_storage:5.3::el8ceph-base-debuginfobefore 2:16.2.10-94.el8cp2:16.2.10-94.el8cp
Red Hat:ceph_storage:5.3::el8ceph-commonbefore 2:16.2.10-94.el8cp2:16.2.10-94.el8cp
Red Hat:ceph_storage:5.3::el8ceph-common-debuginfobefore 2:16.2.10-94.el8cp2:16.2.10-94.el8cp
Red Hat:ceph_storage:5.3::el8ceph-debugsourcebefore 2:16.2.10-94.el8cp2:16.2.10-94.el8cp
Red Hat:ceph_storage:5.3::el8ceph-fusebefore 2:16.2.10-94.el8cp2:16.2.10-94.el8cp
Red Hat:ceph_storage:5.3::el8ceph-fuse-debuginfobefore 2:16.2.10-94.el8cp2:16.2.10-94.el8cp
Red Hat:ceph_storage:5.3::el8ceph-grafana-dashboardsbefore 2:16.2.10-94.el8cp2:16.2.10-94.el8cp
Red Hat:ceph_storage:5.3::el8ceph-immutable-object-cachebefore 2:16.2.10-94.el8cp2:16.2.10-94.el8cp
Red Hat:ceph_storage:5.3::el8ceph-immutable-object-cache-debuginfobefore 2:16.2.10-94.el8cp2:16.2.10-94.el8cp
Red Hat:ceph_storage:5.3::el8ceph-mdsbefore 2:16.2.10-94.el8cp2:16.2.10-94.el8cp
Red Hat:ceph_storage:5.3::el8ceph-mds-debuginfobefore 2:16.2.10-94.el8cp2:16.2.10-94.el8cp
Red Hat:ceph_storage:5.3::el8ceph-mgrbefore 2:16.2.10-94.el8cp2:16.2.10-94.el8cp
Red Hat:ceph_storage:5.3::el8ceph-mgr-cephadmbefore 2:16.2.10-94.el8cp2:16.2.10-94.el8cp
Red Hat:ceph_storage:5.3::el8ceph-mgr-dashboardbefore 2:16.2.10-94.el8cp2:16.2.10-94.el8cp
Red Hat:ceph_storage:5.3::el8ceph-mgr-debuginfobefore 2:16.2.10-94.el8cp2:16.2.10-94.el8cp
Red Hat:ceph_storage:5.3::el8ceph-mgr-diskprediction-localbefore 2:16.2.10-94.el8cp2:16.2.10-94.el8cp
Red Hat:ceph_storage:5.3::el8ceph-mgr-k8seventsbefore 2:16.2.10-94.el8cp2:16.2.10-94.el8cp

+96

Other highest-scoring records for the same primary product.

  • CVE-2022-31129Inefficient Regular Expression Complexity in moment
    32Monitor
  • CVE-2017-18214The moment module before 2.19.3 for Node.js is prone to a regular expression denial of service via a crafted date string, a different vulner
    31Monitor
  • CVE-2016-4055The duration function in the moment package before 2.11.2 for Node.js allows remote attackers to cause a denial of service (CPU consumption)
    29Monitor

Remediation

Which version to upgrade to

Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.

Product / packageFixed versionSource
moment moment2.29.2 · descriptionVendor (CNA)
debian:node-moment2.29.2+ds-1 · Debian:12Package registry (OSV)
npm:moment2.29.2Package registry (OSV)
NuGet:Moment.js2.29.2Package registry (OSV)
red hat:eap7-jackson-databind0:2.12.6.1-1.redhat_00003.1.el7eap · Red Hat:jboss_enterprise_application_platform:7.4::el7Package registry (OSV)
red hat:eap7-netty0:4.1.72-4.Final_redhat_00001.1.el7eap · Red Hat:jboss_enterprise_application_platform:7.4::el7Package registry (OSV)
red hat:eap7-netty-all0:4.1.72-4.Final_redhat_00001.1.el7eap · Red Hat:jboss_enterprise_application_platform:7.4::el7Package registry (OSV)
red hat:eap7-netty-buffer0:4.1.72-4.Final_redhat_00001.1.el7eap · Red Hat:jboss_enterprise_application_platform:7.4::el7Package registry (OSV)
red hat:eap7-netty-codec0:4.1.72-4.Final_redhat_00001.1.el7eap · Red Hat:jboss_enterprise_application_platform:7.4::el7Package registry (OSV)
red hat:eap7-netty-codec-dns0:4.1.72-4.Final_redhat_00001.1.el7eap · Red Hat:jboss_enterprise_application_platform:7.4::el7Package registry (OSV)
red hat:eap7-netty-codec-haproxy0:4.1.72-4.Final_redhat_00001.1.el7eap · Red Hat:jboss_enterprise_application_platform:7.4::el7Package registry (OSV)
red hat:eap7-netty-codec-http0:4.1.72-4.Final_redhat_00001.1.el7eap · Red Hat:jboss_enterprise_application_platform:7.4::el7Package registry (OSV)
red hat:eap7-netty-codec-http20:4.1.72-4.Final_redhat_00001.1.el7eap · Red Hat:jboss_enterprise_application_platform:7.4::el7Package registry (OSV)
red hat:eap7-netty-codec-memcache0:4.1.72-4.Final_redhat_00001.1.el7eap · Red Hat:jboss_enterprise_application_platform:7.4::el7Package registry (OSV)
red hat:eap7-netty-codec-mqtt0:4.1.72-4.Final_redhat_00001.1.el7eap · Red Hat:jboss_enterprise_application_platform:7.4::el7Package registry (OSV)
red hat:eap7-netty-codec-redis0:4.1.72-4.Final_redhat_00001.1.el7eap · Red Hat:jboss_enterprise_application_platform:7.4::el7Package registry (OSV)

Exploit status

Proof of concept available

A public proof of concept or detection signature exists. Exploit knowledge is out there; don't delay patching.

Evidence

  • Proof-of-concept repository on GitHub ×1

Noroxi does not host or link to exploit code. Metasploit module names and Nuclei template ids are shown (names, not code); Exploit-DB entries and PoC repositories are given as counts only.

Public exploit evidence
SourceKindDate
Proof-of-concept repository on GitHubstars:12023-05-29

Research context

For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.

Timeline

From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.

  1. Published
  2. First PoC+419 d
  3. TodayOct 10, 2026+1650 d
EPSS, last 120 days

FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).

Patch and commit links

Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.

Finders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.

No credits in the CNA record.

Variant candidates

Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.

No nightly-computed relations.

Chain candidates

An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.

—

Bug bounty scope

The product’s vendor appears in a public program. Matched by name; verify the scope text in the program.

National notice (Türkiye Cybersecurity Directorate / USOM)

Official security notices citing this record; remediation advice is on the agency's page.

All national notices →

Technical details

Attack conditions

  • Anyone who can reach it over the internet can trigger it.
  • No account or password is required.
  • No user action is required.
  • No special conditions are required; it is repeatable.

If successful

Confidentiality
none
Integrity
high · data or configuration can be modified
Availability
none
Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality impact
None
Integrity impact
High
Availability impact
None

CVSS vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

nvd-primary

Root cause

A user-supplied file name is joined with the allowed directory, but the result is never checked to confirm it is still inside that directory.

A representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.

Vulnerable

ts
const file = path.join(ROOT, req.query.name);res.sendFile(file);

Fixed

ts
const file = path.resolve(ROOT, req.query.name);if (!file.startsWith(ROOT + path.sep)) {  return res.sendStatus(400);}res.sendFile(file);

Change log

  1. Fix✗ → ✓

For records you follow, these changes also arrive as notifications. →

References

All records