sunnyadnのjs-tomlにおける複数の脆弱性
タイトル sunnyadnのjs-tomlにおける複数の脆弱性
概要

js-tomlはJavaScript向けのTOMLパーサーであり、TOML 1.0.0仕様に完全に準拠しています。バージョン1.1.0まで(含む)では、手書きの`parseBigInt`ループを介して16進数、8進数、2進数の整数リテラルを解析していました。このループは各入力桁ごとに基数であるBigIntアキュムレータを乗算します。各反復で、すでに消費された桁数に比例して線形に増加するアキュムレータに対して`BigInt * BigInt`演算を行うため、このループ全体の計算量はリテラル長に対して二乗(nの2乗)となります。レキサの正規表現はリテラル長に上限を設けていないため、約500kBの16進リテラルを含む単一のTOMLドキュメントが、最新のノートパソコン(Apple Mシリーズ、Node v22)で約40秒間1つのCPUコアを占有します。メモリの増幅は限定的ですが、CPU負荷の増幅は深刻で二次関数的に増大し、リテラル長を倍にすると作業量は4倍になります。攻撃者が制御するTOMLを`load()`で読み込む呼び出し元(構成アップロードエンドポイント、サードパーティの`*.toml`を取り込むCI/CDシステム、IDEプラグイン、ビルドツール)は、単一リクエストによるCPU消耗型DoS攻撃にさらされる可能性があります。バージョン1.1.1でこの問題は修正されています。

想定される影響 ・当該ソフトウェアが扱う情報について、外部への漏えいは発生しません。 ・当該ソフトウェアが扱う情報について、書き換えは発生しません。 ・当該ソフトウェアが完全に停止する可能性があります。 
対策

ベンダ情報を参照して適切な対策を実施してください。

公表日 2026年6月19日0:00
登録日 2026年6月29日11:14
最終更新日 2026年6月29日11:14
CVSS3.0 : 重要
スコア 7.5
ベクター CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
影響を受けるシステム
sunnyadn
js-toml 1.1.1 未満
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
ベンダー情報
その他
変更履歴
No 変更内容 変更日
1 [2026年06月29日]
  掲載
2026年6月29日11:14

NVD脆弱性情報
CVE-2026-49293
概要

js-toml is a TOML parser for JavaScript, fully compliant with the TOML 1.0.0 Spec. Versions up to and including 1.1.0 parse hexadecimal / octal / binary integer literals via a hand-written `parseBigInt` loop that multiplies a `BigInt` accumulator by the radix once per input digit. Each iteration performs a `BigInt * BigInt` operation on an accumulator that grows linearly with the number of digits already consumed, so the whole loop is O(n²) in the literal length. The lexer regex places no upper bound on the literal length, so a single TOML document containing one ~500 kB hex literal pins one CPU core for ~40 seconds on a modern laptop (Apple M-series, Node v22). Memory amplification is bounded but CPU amplification is severe and grows quadratically: doubling the literal length quadruples the work. A caller that invokes `load()` on attacker-controlled TOML (configuration upload endpoints, CI/CD systems ingesting third-party `*.toml`, IDE plugins, build tools) is exposed to a single-request CPU exhaustion DoS. Version 1.1.1 fixes the issue.

公表日 2026年6月20日4:16
登録日 2026年6月27日4:06
最終更新日 2026年6月26日21:11
影響を受けるソフトウェアの構成
構成1 以上 以下 より上 未満
cpe:2.3:a:sunnyadn:js-toml:*:*:*:*:*:node.js:*:* 1.1.1
関連情報、対策とツール
共通脆弱性一覧