製品・ソフトウェアに関する情報
sunnyadnのjs-tomlにおける複数の脆弱性
Title sunnyadnのjs-tomlにおける複数の脆弱性
Summary

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でこの問題は修正されています。

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

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

Publication Date June 19, 2026, midnight
Registration Date June 29, 2026, 11:14 a.m.
Last Update June 29, 2026, 11:14 a.m.
CVSS3.0 : 重要
Score 7.5
Vector CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Affected System
sunnyadn
js-toml 1.1.1 未満
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
ベンダー情報
その他
Change Log
No Changed Details Date of change
1 [2026年06月29日]
  掲載
June 29, 2026, 11:14 a.m.

NVD Vulnerability Information
CVE-2026-49293
Summary

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.

Publication Date June 20, 2026, 4:16 a.m.
Registration Date June 27, 2026, 4:06 a.m.
Last Update June 26, 2026, 9:11 p.m.
Affected software configurations
Configuration1 or higher or less more than less than
cpe:2.3:a:sunnyadn:js-toml:*:*:*:*:*:node.js:*:* 1.1.1
Related information, measures and tools
Common Vulnerabilities List