CVE-2026-17495
published medium CVSS 3.1 · 5.9moment vulnerable to Path Traversal via crafted non-string locale name
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| moment | — | moment2.29.2 to < 2.31.0 (affected · semver) · 2.31.0 (unaffected · semver) · Other versions: unaffected | Version-specific | Not stated | openjs |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| SUSE / openSUSE | SLE-15-SP7 | golang-github-prometheus-prometheusaarch64 | Advisory build | 3.13.4-150100.4.43.1 | SUSE-SU-2026:5448-1 |
| SUSE / openSUSE | SLE-15-SP7 | golang-github-prometheus-prometheusppc64le | Advisory build | 3.13.4-150100.4.43.1 | SUSE-SU-2026:5448-1 |
| SUSE / openSUSE | SLE-15-SP7 | golang-github-prometheus-prometheuss390x | Advisory build | 3.13.4-150100.4.43.1 | SUSE-SU-2026:5448-1 |
| SUSE / openSUSE | SLE-15-SP7 | golang-github-prometheus-prometheusx86_64 | Advisory build | 3.13.4-150100.4.43.1 | SUSE-SU-2026:5448-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | velociraptoraarch64 | Advisory build | 0.77.3.0.git141.b1612b50b-1.1 | OPENSUSE-SU-2026:12622-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | velociraptorppc64le | Advisory build | 0.77.3.0.git141.b1612b50b-1.1 | OPENSUSE-SU-2026:12622-1 |
Show 2 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| SUSE / openSUSE | openSUSE-Tumbleweed | velociraptors390x | Advisory build | 0.77.3.0.git141.b1612b50b-1.1 | OPENSUSE-SU-2026:12622-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | velociraptorx86_64 | Advisory build | 0.77.3.0.git141.b1612b50b-1.1 | OPENSUSE-SU-2026:12622-1 |
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().
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 5.9 / 10
- Severity
- medium
- Provider
- openjs · cna
- Vector string
- CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
- Scenarios
- en: GENERAL
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| moment | moment | 2.29.2 to < 2.31.0 (affected · semver)2.31.0 (unaffected · semver)Default: unaffected | openjs · cna |
Weaknesses
1- CWE-27 CWE-27: Path Traversal: 'dir/../../filename'
References
2Provider assertions
2openjs · cna
moment vulnerable to Path Traversal via crafted non-string locale name
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- f99f3fd20ec0d9d192e29e216f8a441dca533e44825ba932ea1af279495db8ff
- Ingested
- 23 Sep 2026, 09:03:03 UTC
- Source record
- Official CVE record