Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
MEDIUM severity

CVE-2026-17495 — moment

MEDIUMFix: moment/moment#6386

CVE-2026-17495 is a medium-severity (CVSS 5.9) CWE-27 vulnerability in moment. A fix is available for moment — see the affected versions and patch details below.

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

Also known asGHSA-4p3w-j4w9-5jqw
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Oct 22, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

No confirmed exploitation observed yet

  • CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for CVE-2026-17495.

EPSS Exploitation Probability

via FIRST.org ↗
0.4%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs28th percentile — riskier than 28% of all scored CVEsHighest risk
0.00%0.29%0.57%0.86%0.4%0.4%Oct 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

CVE-2026-17495 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.

Where this sits among everything scored

Of 394,803 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.

Real-World Exposure

1 pkg affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

71Kother npm packages depend on this — each one inherits the vulnerability until it's patched upstream
momentnpm
22.6Mdownloads / week

Description

moment is a JavaScript date library for parsing, validating, manipulating, and formatting dates. In versions 2.29.2 through 2.30.1, a specially crafted non-string object passed to moment.locale() can bypass the locale-name path-traversal guard. The guard assumes the input is a string, so an object whose match() method satisfies the check while its toString() returns a traversal path reaches an internal require() call with attacker-controlled path segments. This is an incomplete fix for CVE-2022-24785 and primarily affects npm (server-side) users that pass user-provided input directly to moment.locale(). The issue is fixed in moment 2.31.0, and users should upgrade to 2.31.0 or later. As a workaround, validate that any user-supplied input is a string before passing it to moment.locale().

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npmmoment≥ 2.29.2&&< 2.31.02.31.0npm install moment@2.31.0

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for moment, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update moment to 2.31.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-17495 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatModerate

Moderate: A path traversal vulnerability exists in the `moment` JavaScript library when specially crafted non-string input is passed to the `moment.locale()` function. This flaw could allow an attacker to access or create files outside of intended directories on systems where user-provided input is directly used by…

Workaround published by Red Hat
To mitigate this issue, implement strict input validation to ensure that all user-supplied data passed to the `moment.locale()` function is a string. This operational control prevents the processing of crafted non-string objects that could lead to path traversal.
Source: Red Hat security advisory for CVE-2026-17495 (CC BY 4.0)

Frequently Asked Questions

moment is a JavaScript date library for parsing, validating, manipulating, and formatting dates. In versions 2.29.2 through 2.30.1, a specially crafted non-string object passed to moment.locale() can bypass the locale-name path-traversal guard. The guard assumes the input is a string, so an object whose match() method satisfies the check while its toString() returns a traversal path reaches an internal require() call with attacker-controlled path segments. This is an incomplete fix for CVE-2022-24785 and primarily affects npm (server-side) users that pass user-provided input directly to moment
O3 Security · Impact-Aware SCA

Is CVE-2026-17495 in your dependencies?

Find it across npm, including transitive dependencies.

CVE-2026-17495: moment — Fixed in 2.31.0