CVE-2026-49293 Details
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.
A denial-of-service vulnerability has been identified in js-toml, a TOML parser for JavaScript, in versions through 1.1.0. The issue arises from the parser's handling of hexadecimal, octal, and binary integer literals, which is done using a custom loop that processes each digit sequentially. This approach results in a quadratic time complexity, allowing an attacker to exploit the parser with a large literal and cause significant CPU exhaustion. The vulnerability is triggered when the load() function is called with TOML input that contains long radix-prefixed literals, particularly in environments that process such input from untrusted sources.
Users are advised to upgrade to js-toml version 1.1.1, which addresses the vulnerability by replacing the inefficient manual parsing method with the native BigInt constructor, and by capping the length of radix-prefixed literals at 1000 digits.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jun 22, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/sunnyadn/js-toml/security/advisories/GHSA-wp3c-266w-4qfq | CISA-ADP | ExploitMitigationVendor Advisory |
| https://github.com/sunnyadn/js-toml/commit/1abcb31dc7b1fa88e4c848a8d108891cfbb96fa2 | [email protected] | Patch |
| https://github.com/sunnyadn/js-toml/releases/tag/v1.1.1 | [email protected] | Release Notes |
| https://github.com/sunnyadn/js-toml/security/advisories/GHSA-wp3c-266w-4qfq | [email protected] | ExploitMitigationVendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-1333 | Inefficient Regular Expression Complexity | [email protected] |
| CWE-400 | Uncontrolled Resource Consumption | [email protected] |
| CWE-407 | Inefficient Algorithmic Complexity | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| sunnyadn js-toml | < 1.1.1 |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 26, 2026 | Initial Analysis | [email protected] |
| Jun 22, 2026 | CVE Modified | CISA-ADP |
| Jun 19, 2026 | New CVE Received | [email protected] |