CVE-2022-24785

NameCVE-2022-24785
DescriptionMoment.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.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)
ReferencesDLA-3295-1
Debian Bugs1009327

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
node-moment (PTS)stretch2.17.1+ds-1vulnerable
buster (security), buster, buster (lts)2.24.0+ds-1+deb10u1fixed
bullseye2.29.1+ds-2+deb11u2fixed
sid, trixie, bookworm2.29.4+ds-1fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
node-momentsourcestretch(unfixed)end-of-life
node-momentsourcebuster2.24.0+ds-1+deb10u1DLA-3295-1
node-momentsourcebullseye2.29.1+ds-2+deb11u1
node-momentsource(unstable)2.29.2+ds-11009327

Notes

[stretch] - node-moment <end-of-life> (Nodejs in stretch not covered by security support)
https://github.com/moment/moment/security/advisories/GHSA-8hfj-j24r-96c4
https://github.com/moment/moment/commit/4211bfc8f15746be4019bba557e29a7ba83d54c5 (2.29.2)

Search for package or bug name: Reporting problems