Advisory

UBUNTU-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-11-17 04:00 UTC

Affected packages and fixes

node-moment

Debian packages (deb) · Ubuntu 18.04

Affected

  • introduced 0 (ecosystem)

Fixed versions

None listed

Fix

No fixed version is listed.

node-moment

Debian packages (deb) · Ubuntu 20.04

Affected

  • introduced 0 (ecosystem)

Fixed versions

None listed

Fix

No fixed version is listed.

node-moment

Debian packages (deb) · Ubuntu 22.04

Affected

  • introduced 0 (ecosystem)

Fixed versions

None listed

Fix

No fixed version is listed.

python-xstatic-moment

Debian packages (deb) · Ubuntu 22.04

Affected

  • introduced 0 (ecosystem)

Fixed versions

None listed

Fix

No fixed version is listed.

node-moment

Debian packages (deb) · Ubuntu 24.04

Affected

  • introduced 0 (ecosystem)

Fixed versions

None listed

Fix

No fixed version is listed.

python-xstatic-moment

Debian packages (deb) · Ubuntu 24.04

Affected

  • introduced 0 (ecosystem)

Fixed versions

None listed

Fix

No fixed version is listed.

node-moment

Debian packages (deb) · Ubuntu 26.10

Affected

  • introduced 0 (ecosystem)

Fixed versions

None listed

Fix

No fixed version is listed.

python-xstatic-moment

Debian packages (deb) · Ubuntu 26.10

Affected

  • introduced 0 (ecosystem)

Fixed versions

None listed

Fix

No fixed version is listed.

node-moment

Debian packages (deb) · Ubuntu 26.04

Affected

  • introduced 0 (ecosystem)

Fixed versions

None listed

Fix

No fixed version is listed.

python-xstatic-moment

Debian packages (deb) · Ubuntu 26.04

Affected

  • introduced 0 (ecosystem)

Fixed versions

None listed

Fix

No fixed version is listed.

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: Ubuntu Security Notices · CC BY-SA 4.0

Sources & licences