Is moment 2.22 vulnerable?

npm · 3 releases from 2.22.0 to 2.22.2 · latest moment is 2.31.0 · checked 2 Nov 2026

Yes: 2 known advisories

Yes. moment 2.22.2, the last 2.22 release, is affected by 2 known security advisories (2 high), including CVE-2022-31129, CVE-2022-24785. Upgrade to 2.29.4 or later to fix all of them.

Upgrade with:npm install moment@2.29.4

Is your project affected?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Advisories affecting moment 2.22.2

  • HighCVE-2022-31129GHSA-wc69-rhjr-hc9g6 Jul 2022

    Moment.js vulnerable to Inefficient Regular Expression Complexity

    Affected
    >=2.18.0 <2.29.4
    Fixed in
    2.29.4
  • HighCVE-2022-24785GHSA-8hfj-j24r-96c44 Apr 2022

    Path Traversal: 'dir/../../filename' in moment.locale

    Affected
    <2.29.2
    Fixed in
    2.29.2

Which of your client projects are still on moment 2.22?

NPMscan reads the lockfiles in every GitHub repo you pick, finds the exact moment version each one installs, and checks it against these advisories. Each finding comes with the command that fixes it.

Other moment versions

Advisory data from OSV.dev (opens OSV.dev in a new tab), which includes the GitHub Advisory Database. Release list from the npm registry. Refreshed daily.