node-moment — security advisory
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.
- Products
- node-moment
- Affected versions
- Not specified
- Fixed versions
- 2.29.2+ds-1
- CVEs
- CVE-2022-24785
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 30 Oct 2026, 14:35 UTC · Revision 1
Source evidence
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.
osv:DEBIAN-CVE-2022-24785
node-moment
Fixed versions: 2.29.2+ds-1
node-moment
Fixed versions: 2.29.2+ds-1
node-moment
Fixed versions: 2.29.2+ds-1
Complete source record
{
"id": "58d7152aa24fd7bb85b7e6bd4d34ce139648490c5bfc8d3af2196c17e44a3d37",
"url": "https://osv.dev/vulnerability/DEBIAN-CVE-2022-24785",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "DEBIAN-CVE-2022-24785",
"summary": "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.",
"evidence": "osv:DEBIAN-CVE-2022-24785",
"products": [
{
"name": {
"value": "node-moment",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "2.29.2+ds-1",
"evidence": "/affected/0/ranges"
}
],
"affected_versions": []
},
{
"name": {
"value": "node-moment",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "2.29.2+ds-1",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
},
{
"name": {
"value": "node-moment",
"evidence": "/affected/2/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "2.29.2+ds-1",
"evidence": "/affected/2/ranges"
}
],
"affected_versions": []
}
],
"severity": "high",
"structured": {
"id": "DEBIAN-CVE-2022-24785",
"aliases": [
"DEBIAN-CVE-2022-24785"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "2.29.2+ds-1"
}
]
}
],
"package": {
"name": "node-moment",
"purl": "pkg:deb/debian/node-moment?arch=source&distro=bookworm",
"ecosystem": "Debian:12"
},
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-24785.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "2.29.2+ds-1"
}
]
}
],
"package": {
"name": "node-moment",
"purl": "pkg:deb/debian/node-moment?arch=source&distro=trixie",
"ecosystem": "Debian:13"
},
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-24785.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "2.29.2+ds-1"
}
]
}
],
"package": {
"name": "node-moment",
"purl": "pkg:deb/debian/node-moment?arch=source&distro=forky",
"ecosystem": "Debian:14"
},
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-24785.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
}
],
"modified": "2026-10-15T08:00:50.882347825Z",
"provider": "osv",
"upstream": [
"CVE-2022-24785"
],
"references": [
"https://security-tracker.debian.org/tracker/CVE-2022-24785"
]
},
"related_cves": [
{
"value": "CVE-2022-24785",
"evidence": "/upstream"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 322681,
"published_at": "2022-04-04T17:15:07.583+00:00"
}