CVE-2026-49293: CWE-400: Uncontrolled Resource Consumption in sunnyadn js-toml
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.
AI Analysis
Technical Summary
The js-toml JavaScript TOML parser (versions <=1.1.0) has an uncontrolled resource consumption vulnerability (CWE-400) due to its `parseBigInt` function. This function parses integer literals by repeatedly multiplying a BigInt accumulator by the radix for each digit, resulting in O(n²) CPU complexity relative to the literal length. The lexer does not limit the length of these literals, enabling an attacker to craft a single large hexadecimal (or octal/binary) literal (~500 kB) that can exhaust CPU resources for approximately 40 seconds on modern hardware. This vulnerability can be exploited via attacker-controlled TOML inputs in contexts such as configuration uploads or CI/CD pipelines. The vulnerability is tracked as CVE-2026-49293 with a CVSS 3.1 base score of 7.5 (high severity). The issue is resolved in js-toml version 1.1.1.
Potential Impact
An attacker can cause a denial of service by submitting a specially crafted TOML document containing a very large hexadecimal, octal, or binary integer literal. This triggers a CPU exhaustion condition due to the quadratic time complexity of the parsing loop, effectively pinning a CPU core for tens of seconds. There is no impact on confidentiality or integrity, but availability is severely affected during exploitation.
Mitigation Recommendations
Upgrade js-toml to version 1.1.1 or later, where this vulnerability is fixed. Until then, avoid processing untrusted TOML inputs or implement input size restrictions on integer literals to mitigate CPU exhaustion. Patch status is not explicitly stated in the vendor advisory, but version 1.1.1 is confirmed to fix the issue.
CVE-2026-49293: CWE-400: Uncontrolled Resource Consumption in sunnyadn js-toml
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 v3.1
Score 7.5high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The js-toml JavaScript TOML parser (versions <=1.1.0) has an uncontrolled resource consumption vulnerability (CWE-400) due to its `parseBigInt` function. This function parses integer literals by repeatedly multiplying a BigInt accumulator by the radix for each digit, resulting in O(n²) CPU complexity relative to the literal length. The lexer does not limit the length of these literals, enabling an attacker to craft a single large hexadecimal (or octal/binary) literal (~500 kB) that can exhaust CPU resources for approximately 40 seconds on modern hardware. This vulnerability can be exploited via attacker-controlled TOML inputs in contexts such as configuration uploads or CI/CD pipelines. The vulnerability is tracked as CVE-2026-49293 with a CVSS 3.1 base score of 7.5 (high severity). The issue is resolved in js-toml version 1.1.1.
Potential Impact
An attacker can cause a denial of service by submitting a specially crafted TOML document containing a very large hexadecimal, octal, or binary integer literal. This triggers a CPU exhaustion condition due to the quadratic time complexity of the parsing loop, effectively pinning a CPU core for tens of seconds. There is no impact on confidentiality or integrity, but availability is severely affected during exploitation.
Mitigation Recommendations
Upgrade js-toml to version 1.1.1 or later, where this vulnerability is fixed. Until then, avoid processing untrusted TOML inputs or implement input size restrictions on integer literals to mitigate CPU exhaustion. Patch status is not explicitly stated in the vendor advisory, but version 1.1.1 is confirmed to fix the issue.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-05-28T20:07:58.862Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a358c5cf198dc38c1f2fbb5
Added to database: 06/19/2026, 18:37:16 UTC
Last enriched: 06/26/2026, 19:22:20 UTC
Last updated: 08/02/2026, 19:17:59 UTC
Views: 64
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.