Skip to main content
← All vulnerabilities
CVE-2022-24785GHSA-8HFJ-J24R-96C4

Path Traversal in Moment.js

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 2.29.2
1 proof of concept on GitHub
  • Exploitation: none
  • Automatable: yes
  • Technical impact: partial

Summary

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

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: none · Automatable: yes · Technical impact: partial

  3. Record last updated
  4. EPSS reached 10%

    FIRST estimates at least a 10% chance of exploitation in the next 30 days

Affected versions

  • moment moment

    From 1.0.1 · fixed in 2.29.2

  • momentnpm

    fixed in 2.29.2

  • Moment.jsNuGet

    fixed in 2.29.2

References 8

GitHub · moment/moment

tenable.com

security.netapp.com

lists.fedoraproject.org

lists.debian.org

GitHub · AnomalousVectors/cve-2022-24785-poc-lab