logo

CVE-2022-24785 moment

Package

Manager: npm
Name: moment
Vulnerable Version: >=0 <2.29.2

Severity

Level: High

CVSS v3.1: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N

EPSS: 0.00682 pctl0.70732

Details

Path Traversal: 'dir/../../filename' in moment.locale ### Impact This vulnerability impacts npm (server) users of moment.js, especially if user provided locale string, eg `fr` is directly used to switch moment locale. ### Patches This problem is patched in 2.29.2, and the patch can be applied to all affected versions (from 1.0.1 up until 2.29.1, inclusive). ### Workarounds Sanitize user-provided locale name before passing it to moment.js. ### References _Are there any links users can visit to find out more?_ ### For more information If you have any questions or comments about this advisory: * Open an issue in [moment repo](https://github.com/moment/moment)

Metadata

Created: 2022-04-04T21:25:48Z
Modified: 2022-04-04T21:25:48Z
Source: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/04/GHSA-8hfj-j24r-96c4/GHSA-8hfj-j24r-96c4.json
CWE IDs: ["CWE-22", "CWE-27"]
Alternative ID: GHSA-8hfj-j24r-96c4
Finding: F063
Auto approve: 1