CVE-2026-49293 CPU exhaustion via O(n^2) BigInt construction on radix-prefixed integer literals

High 7.5 Published Updated

Attackers can cause CPU exhaustion and denial of service by submitting TOML documents with excessively long integer literals to applications using the js-toml library.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-49293?

CVE-2026-49293 is a high-severity denial of service vulnerability in sunnyadn js-toml, published on 19 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Weakness: CWE-407, CWE-400, CWE-1333

Which versions are affected by CVE-2026-49293?

2 open source packages ship an affected version, including js-toml. It affects 1 product.

PackageAffectedFixed in
js-toml npmAll versions1.1.1
js-toml npmAll versions1.1.1

Products include Sunnyadn Js-Toml.

How do I fix CVE-2026-49293?

Upgrade js-toml to 1.1.1 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2026-49293 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-49293 exists.

Sources

Also known as GHSA-wp3c-266w-4qfq.

Is CVE-2026-49293 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free