Patch Forecast
Yellow warning
Plan into this sprint.

CVE-2026-17495 · GHSA-4p3w-j4w9-5jqw

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

Risk score
46/100
CVSS
5.9 v3.1
Exploit chance (30 days)
0.4%
Published
29 Sep 2026

Open in the live forecast Today's forecast

What to know

What it is
moment before 2.31.0 is vulnerable to path traversal in moment.locale(). When an application passes a non-string, attacker-influenced value to moment.locale(), a specially crafted object can bypass the locale name validation and cause moment to load a file from an attacker-controlled path. This is a further bypass of …
Affected
moment (npm) >= 2.29.2, < 2.31.0
Fix
Upgrade moment to 2.31.0 or later.
Exploitation
No known exploitation

Why it is Yellow

  • CVSS 5.9 medium
  • On your watchlist: npm

Affected packages

PackageEcosystemVulnerableFixed in
momentnpm>= 2.29.2, < 2.31.02.31.0

References

Original description

### Impact moment before 2.31.0 is vulnerable to path traversal in `moment.locale()`. When an application passes a non-string, attacker-influenced value to `moment.locale()`, a specially crafted object can bypass the locale name validation and cause moment to load a file from an attacker-controlled path. This is a further bypass of the validation added in 2.29.2 for [CVE-2022-24785](https://github.com/moment/moment/security/advisories/GHSA-8hfj-j24r-96c4). This affects server-side (npm) users only. Plain string input is not affected: the existing validation correctly rejects strings that contain path separators. ### Patches This issue is patched in moment 2.31.0. ### Workarounds Validate that any user-supplied input is a string before passing it to `moment.locale()`.

Last activity 29 Sep 2026. Patch Forecast updates every hour.