Live threats

All CVEs / Momentjs

CVE-2022-24785Momentjs Moment

High 7.5 No auth needed

Priority
60
CVSS 3.1
7.5
EPSS
2.7%
probability of exploitation in 30 days · percentile 87
Auth required
No
Published
Apr 4, 2022
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-22, CWE-27
SSVC (CISA)
Exploitation: none · Automatable: yes · Technical impact: partial
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Moment.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
NuGet Moment.js < 2.29.2 2.29.2 dotnet add package Moment.js --version 2.29.2
npm moment < 2.29.2 2.29.2 npm install moment@2.29.2

Per OSV / GitHub Advisories (GHSA-8hfj-j24r-96c4). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
momentjsmoment≥ 1.0.1 < 2.29.2
momentjsmoment≥ 1.0.1 < 2.29.2
tenabletenable.sc< 5.21.0
netappactive_iqall
fedoraprojectfedora35
fedoraprojectfedora36
debiandebian_linux10.0

Official sources

References

Links published by the sources. Open them with care.