CVE-2022-24785
HIGH EXPLOITEDMoment.js 1.0.1-2.29.1 - Path Traversal via Locale Switching
Title source: llmExploitation Summary
CVE-2022-24785 has been observed exploited in the wild (reported by VulnCheck KEV). EIP tracks 1 public exploit from researchers including pS3ud0RAnD0m.
AI-analyzed exploit summary This repository contains a functional PoC for CVE-2022-24785, a path traversal vulnerability in Moment.js. The Node.js Express app demonstrates the vulnerability by allowing arbitrary locale file inclusion via the `localeId` parameter.
Description
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.
Exploits (1)
This repository contains a functional PoC for CVE-2022-24785, a path traversal vulnerability in Moment.js. The Node.js Express app demonstrates the vulnerability by allowing arbitrary locale file inclusion via the `localeId` parameter.
References (8)
Scores
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N