Moment.jsに脆弱性(CVE-2026-17495)
概要
Moment.jsに脆弱性が確認されました。
バージョン 2.29.2 以上 2.31.0 未満に影響があります。
修正版 2.31.0 への更新が推奨されます。
脆弱性の基本情報
| 脆弱性ID |
CVE-2026-17495 GHSA-4p3w-j4w9-5jqw |
|---|---|
| 脆弱性の種類 | CWE-27 |
| 危険度 | 中 |
| CVSSスコア |
5.9(CVSS v3.x) CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N |
| 公開日 | 2026年9月29日 |
| 更新日 | 2026年9月30日 |
影響を受ける製品
| 製品 | 影響を受けるバージョン | 修正版 | 出典 |
|---|---|---|---|
| Moment.js |
2.29.2 以上 2.31.0 未満 | 2.31.0 | OSV.dev |
推奨対応
- Moment.jsを修正版 2.31.0 またはそれ以降の公式最新版へ更新してください。
情報元の原文
OSV.dev
moment vulnerable to Path Traversal via crafted non-string locale name
### Impact
moment before 2.31.0 is vulnerable to path traversal in `moment.locale()`. When an application passes a non-string, attacker-influenced value to `moment.locale()`, a specially crafted object can bypass the locale name validation and cause moment to load a file from an attacker-controlled path. This is a further bypass of the validation added in 2.29.2 for [CVE-2022-24785](https://github.com/moment/moment/security/advisories/GHSA-8hfj-j24r-96c4).
This affects server-side (npm) users only. Plain string input is not affected: the existing validation correctly rejects strings that contain path separators.
### Patches
This issue is patched in moment 2.31.0.
### Workarounds
Validate that any user-supplied input is a string before passing it to `moment.locale()`.
利用条件:CC BY 4.0
出典: GitHub Advisory Database(OSV.dev 経由で取得)。原文のまま掲載(改変なし)