Intel

AIKIDO-2026-947101

moment is vulnerable to Path Traversal

Path TraversalCVE-2026-17495 Published Yesterday

59

Medium Risk

This Affects:

JSmoment
2.29.2 - 2.30.1
Fixed in 2.31.0
Are you affected? Scan for Free

TL;DR

moment's locale loader guards against path traversal by calling match() on the locale name without first requiring that name to be a string. A non-string object whose match() satisfies the guard while its toString() or Symbol.toPrimitive returns a traversal path reaches Node's require('./locale/' + name), loading a module from a path the caller of moment.locale() chooses. Plain string locale names are unaffected because the existing validation rejects path separators in strings, so this reaches only server-side Node applications that pass externally influenced non-string values into moment.locale(), and it leaves CVE-2022-24785 incompletely fixed. The fix requires a canonical lowercase locale string before any dynamic require runs.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and your application passes user-influenced non-string values directly to moment.locale().

Background info

moment is vulnerable to Path Traversal in versions 2.29.2 - 2.30.1.

How to fix this

Upgrade the moment library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform