CVE Database›CVE-2022-24785

CVE-2022-24785

Moment.js: Path traversal in moment.locale

Loading…

Severity

Moderate

Red Hat Product Security

7.5

CVSS 3.1

Review impact separately from score.

Published · April 4, 2022

Updated · November 1, 2026

Description

A path traversal vulnerability was found in Moment.js that impacts npm (server) users. This issue occurs if a user-provided locale string is directly used to switch moment locale, which an attacker can exploit to change the correct path to one of their choice. This can result in a loss of integrity.

Statement

In Quay 3.10 and above, no version of affected momentjs is present.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

Sanitize the user-provided locale name before passing it to Moment.js.

CVSS / CWE

CVSS 3.1 · 7.5
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

CWE-22 · Improper Limitation of a Pathname to a Restricted Directory