cve.bz

CVE-2026-17495 moment moment: Path Traversal: 'dir/../../filename'

5.9 mediumEPSS 0.5%Fix available

Medium (5.9) in moment moment. EPSS 0.5% estimated probability of exploitation activity in the next 30 days. Fixed in moment 2.31.0.

On this page
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().

Severity

CVSS 3.1

5.9 medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
EPSS
0.5% (unchanged from 0.5% a week ago; 0.5% 30 days ago) estimated probability of exploitation activity in the next 30 days; 31st percentile. Scored 2026-11-30. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2026-09-15. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-27 Path Traversal: 'dir/../../filename'
Published
Modified
NVD analysis
Awaiting analysis
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-17495 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-17495?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-17495?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-17495 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
momentfrom 2.29.2 before 2.31.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-4p3w-j4w9-5jqwnpmmoment>=2.29.2 <2.31.02.31.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13node-momentno fix listedDEBIAN-CVE-2026-17495
Debian14node-moment2.31.0+ds1-1DEBIAN-CVE-2026-17495
Ubuntu18.04:LTS, 20.04:LTS, Pro:16.04:LTSnode-momentno fix listedUBUNTU-CVE-2026-17495
Ubuntu22.04:LTS, 24.04:LTS, 26.04:LTS and 1 morenode-moment, python-xstatic-momentno fix listedUBUNTU-CVE-2026-17495
SUSELinux Enterprise Module for Package Hub 15 SP7golang-github-prometheus-prometheus3.13.4-150100.4.43.1SUSE-SU-2026:5448-1
SUSEMulti Linux Manager Tools SLE-15golang-github-QubitProducts-exporter_exporter0.4.0-150002.3.9.1SUSE-SU-2026:5446-1
SUSEMulti Linux Manager Tools SLE-15golang-github-lusitaniae-apache_exporter1.0.10-150002.3.12.1SUSE-SU-2026:5446-1
SUSEMulti Linux Manager Tools SLE-15golang-github-prometheus-alertmanager0.33.1-150002.4.17.1SUSE-SU-2026:5446-1
SUSEMulti Linux Manager Tools SLE-15golang-github-prometheus-prometheus3.13.4-150002.3.22.1SUSE-SU-2026:5446-1
SUSEMulti Linux Manager Tools SLE-15grafana12.4.11-150002.4.30.1SUSE-SU-2026:5446-1
SUSEMulti Linux Manager Tools SLE-15prometheus-blackbox_exporter0.26.0-150002.3.14.1SUSE-SU-2026:5446-1
SUSEMulti Linux Manager Tools SLE-15prometheus-postgres_exporter0.10.1-150002.3.6.1SUSE-SU-2026:5446-1
SUSEMulti Linux Manager Tools SLE-15rhnlib5.2.6-150002.3.12.1SUSE-SU-2026:5446-1
SUSEMulti Linux Manager Tools SLE-15spacecmd5.2.11-150002.3.18.1SUSE-SU-2026:5446-1
SUSEMulti Linux Manager Tools SLE-15spacewalk-client-tools5.2.8-150002.3.15.1SUSE-SU-2026:5446-1
SUSEMulti Linux Manager Tools SLE-15uyuni-common-libs5.2.6-150002.3.9.1SUSE-SU-2026:5446-1
2 more for SUSE in the JSON and on SUSE's page.
openSUSETumbleweedvelociraptor0.77.3.0.git141.b1612b50b-1.1openSUSE-SU-2026:12622-1

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE · openSUSE.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

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 `moment.locale()` in server-side npm deployments.

Red Hat's mitigation

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.

ProductPackageStateAdvisory
Multicluster Engine for Kubernetesmulticluster-engine/console-mce-rhel9Out of support scope
OpenShift Pipelinesopenshift-pipelines/pipelines-hub-ui-rhel8Fix deferred
OpenShift Pipelinesopenshift-pipelines/pipelines-hub-ui-rhel9Fix deferred
OpenShift Service Mesh 3openshift-service-mesh/kiali-operator-bundleOut of support scope
OpenShift Service Mesh 3openshift-service-mesh/kiali-ossmc-rhel9Fix deferred
OpenShift Service Mesh 3openshift-service-mesh/kiali-rhel9Fix deferred
OpenShift Service Mesh 3openshift-service-mesh/kiali-rhel9-operatorOut of support scope
Red Hat 3scale API Management Platform 23scale-amp2/system-rhel8Out of support scope
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/console-rhel9Out of support scope
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/volsync-operator-bundleOut of support scope
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/volsync-rhel9Out of support scope
Red Hat AMQ Broker 7amq-broker-bin.zipFix deferred
Red Hat AMQ Broker 7amq-broker-maven-repository.zipFix deferred
Red Hat Ansible Automation Platform 2automation-hubOut of support scope
Red Hat Ansible Automation Platform 2python3.11-galaxy-ngOut of support scope
Red Hat Ansible Automation Platform 2python3.12-galaxy-ngOut of support scope
Red Hat Ansible Automation Platform 2python3x-galaxy-ngOut of support scope
Red Hat Ansible Automation Platform 2python-galaxy-ngOut of support scope
Red Hat build of Apache Camel for Spring Boot 4rhaf-camel-for-springboot-maven-repository.zipFix deferred
Red Hat build of Apache Camel for Spring Boot 4rhaf-camel-spring-boot-maven-repository.zipFix deferred
57 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-17495.

References

Check your stackJSON