CVE-2022-24785
Path Traversal in Moment.js
Exploitation likely. EPSS gives it a 14% chance of exploitation in the next 30 days. A vendor fix is available.
What to do
The vendor has published a fix. Version details are below where the sources state them.
Steps
Written by AI from the record- Check your application dependencies and server-side code for Moment.js versions 1.0.1 through 2.29.1, especially where a visitor-supplied language or locale setting is used.
- Upgrade Moment.js to version 2.29.2 or later.
- If you use Tenable.sc, upgrade it to 5.21.0 or later; if you use RedCheck, update its scanning agent to 2.8.0 or later.
- Until Moment.js is updated, allow only known-safe locale names before passing them to the application.
npm install moment@^2.29.2What it is
From the CVE record
Moment.js is a JavaScript date library for parsing, validating, manipulating, and formatting dates. A path traversal vulnerability impacts npm (server) users of Moment.js between versions 1.0.1 and 2.29.1, especially if a user-provided locale string is directly used to switch moment locale. This problem is patched in 2.29.2, and the patch can be applied to all affected versions. As a workaround, sanitize the user-provided locale name before passing it to Moment.js.
In plain language
Written by AI from the recordMoment.js versions 1.0.1 through 2.29.1 can let an attacker manipulate server file paths through a supplied language setting, so businesses using it on servers should update.
CVE-2022-24785 is an unauthenticated path-traversal issue in server-side Moment.js locale loading when an application passes attacker-controlled locale strings to the library.
If you're affected
- Server file path manipulation
- Application behavior tampering
- Operational disruption
Exploitation
Where each signal puts this CVE on the scale from published to confirmed exploited.
- CISA KEV
Not in the catalog. CISA has not confirmed exploitation.
- Public exploits
No public exploit or proof of concept found in the sources we track.
- EPSS
14% chance of exploitation activity in the next 30 days, which ranks it in the 96th percentile of scored CVEs.
Exploit Prediction Scoring System, FIRST.org. A probability, not a confirmation.
Lifecycle
8 events over 1626 days, from the signal feeds we watch.
- EPSS band changelow → moderateepss band change
- OpenVAS check added
- Patch availablerecord updated
- Publishedweakness classified, att&ck mapped
Affected products
And 4 more affected products. See all after sign-in
Technical detail
CVSS 3.1 vector
Open in the CVSS calculatorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Scored 7.5 by NVD.
How it is reached
- Attack Vector NetworkExploitable remotely over the network without any special conditions
- Attack Complexity LowNo special conditions — the attack can be reliably reproduced
- Privileges Required NoneNo authentication required — anyone can exploit this
- User Interaction NoneNo user interaction needed — fully automated exploitation
Scope
- Scope UnchangedImpact is limited to the vulnerable component itself
Impact if exploited
- Confidentiality NoneNo confidentiality impact
- Integrity HighTotal loss of integrity — attacker can modify any data in the component
- Availability NoneNo availability impact
Weaknesses
ATT&CK techniques
Mapped from the weaknesses above (CWE to ATT&CK), not observed in attacks.
Sources
Watch the software you run.
My Stack ranks new CVEs for your products by real-world exploitation, so the next serious one reaches you without reading every advisory.
We'll flag the next CVE, public exploit or patch for Moment, not every advisory.
A free account adds
- The full version matrix and every affected product
- Exploit links, proofs of concept and Metasploit modules
- Email alerts for the products you watch
- The same data over REST API, MCP and CLI