moment vulnerabilities

Parse, validate, manipulate, and display dates

Registry
npm
Latest
2.31.0
License
MIT

5 known advisories

The latest version, 2.31.0, is not affected by any of them. Projects on older versions may be.

Update to the latest version:npm install moment@2.31.0

Security advisories for moment

  • MediumGHSA-4p3w-j4w9-5jqw29 Sept 2026

    moment vulnerable to Path Traversal via crafted non-string locale name

    Affected
    >=2.29.2 <2.31.0
    Fixed in
    2.31.0
  • HighGHSA-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
  • HighGHSA-8hfj-j24r-96c44 Apr 2022

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

    Affected
    <2.29.2
    Fixed in
    2.29.2
  • HighGHSA-446m-mv8f-q3485 Mar 2018

    Regular Expression Denial of Service in moment

    Affected
    <2.19.3
    Fixed in
    2.19.3
  • MediumGHSA-87vv-r9j6-g5qv24 Oct 2017

    Regular Expression Denial of Service in moment

    Affected
    <2.11.2
    Fixed in
    2.11.2

Which of your client projects still run an old moment?

NPMscan reads the package-lock.json, yarn.lock and pnpm-lock.yaml in every GitHub repo you pick and checks each installed version against these advisories, including the packages your packages pull in. Each finding comes with the command that fixes it.

Other npm packages

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily. Package details from the npm registry.