Vulnerability Information
Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.
Vulnerability Title
CPU exhaustion via O(n^2) BigInt construction on radix-prefixed integer literals
Vulnerability Description
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.
CVSS Information
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Vulnerability Type
未加控制的资源消耗(资源穷尽)
Vulnerability Title
sunnyadn js-toml 资源管理错误漏洞
Vulnerability Description
sunnyadn js-toml是sunnyadn个人开发者开源的一个TOML解析库。 sunnyadn js-toml 1.1.1之前版本存在资源管理错误漏洞,该漏洞源于解析十六进制/八进制/二进制整数时,手工编写的`parseBigInt`循环导致CPU资源过度消耗,攻击者可通过`load()`函数加载特制TOML文档实施单请求CPU耗尽拒绝服务攻击。
CVSS Information
N/A
Vulnerability Type
N/A