Advisory

DEBIAN-CVE-2026-17495

Also known as: CVE-2026-17495

Summary

The record has no summary.

Details

moment is a JavaScript date library for parsing, validating, manipulating, and formatting dates. In versions 2.29.2 through 2.30.1, a specially crafted non-string object passed to moment.locale() can bypass the locale-name path-traversal guard. The guard assumes the input is a string, so an object whose match() method satisfies the check while its toString() returns a traversal path reaches an internal require() call with attacker-controlled path segments. This is an incomplete fix for CVE-2022-24785 and primarily affects npm (server-side) users that pass user-provided input directly to moment.locale(). The issue is fixed in moment 2.31.0, and users should upgrade to 2.31.0 or later. As a workaround, validate that any user-supplied input is a string before passing it to moment.locale().

Severity

Medium Basis: CVSS v3 score 5.9, vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N

Dates

Published
2026-09-15 06:16 UTC
Modified
2026-10-01 03:02 UTC

Affected packages and fixes

node-moment

Debian packages (deb) · Debian 12

Affected

  • introduced 0 (ecosystem)

Fixed versions

None listed

Fix

No fixed version is listed.

node-moment

Debian packages (deb) · Debian 13

Affected

  • introduced 0 (ecosystem)

Fixed versions

None listed

Fix

No fixed version is listed.

node-moment

Debian packages (deb) · Debian 14

Affected

  • introduced 0, fixed 2.31.0+ds1-1 (ecosystem)

Fixed versions

2.31.0+ds1-1

Fix

  • Fixed version 2.31.0+ds1-1
    sudo apt-get update && sudo apt-get upgrade

This command upgrades the distribution's packages. Compare the fixed version with the version you have installed.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: Debian Security Tracker (converted by OSV.dev)

Debian Security Tracker, converted to OSV by OSV.dev.

Sources & licences