CPU exhaustion via O(n^2) BigInt construction on radix-prefixed integer literals
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-1333.
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.1 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.2 fixes the issue.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| sunnyadn | js-toml | before 1.1.2 | 1.1.2 | Patch available | CNA |
| — | js-toml (npm) | before 1.1.2 | 1.1.2 | Patch available | GHSA-wp3c-266w-4qfq |
- js-toml Vendorsunnyadn Affected before 1.1.2 Fixed in 1.1.2 Patch available CNA
- js-toml (npm) Vendor— Affected before 1.1.2 Fixed in 1.1.2 Patch available GHSA-wp3c-266w-4qfq
Remediation
- Fix · CNA js-toml (sunnyadn) Fixed in 1.1.2
- Fix · GHSA-wp3c-266w-4qfq js-toml (npm) Fixed in 1.1.2 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-49293
- 2026-10-03 Alias added: GHSA-wp3c-266w-4qfq
- 2026-10-21 EPSS moved to the 50th–90th percentile
- 2026-11-04 Affected versions changed · CNA
- 2026-11-04 2 new references · CNA
- 2026-11-04 Fix available: npm/[email protected] · GHSA-wp3c-266w-4qfq
- 2026-11-04 2 new references · GHSA-wp3c-266w-4qfq
References
More sunnyadn Js-toml vulnerabilities
- TI-2025-34557 js-toml is vulnerable to Prototype Pollution CVSS 4.0HIGH 7.9
Sources
- CVE-2026-49293 · CVE Program
- CVE-2026-49293 · NVD
- FIRST EPSS
- GHSA-wp3c-266w-4qfq · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences