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

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

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 19 Jun 2026
- **Updated:** 22 Jun 2026
- **Also known as:** GHSA-wp3c-266w-4qfq

## 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 (Inefficient Algorithmic Complexity), CWE-400 (Uncontrolled Resource Consumption), CWE-1333 (Inefficient Regular Expression Complexity)

## Which versions are affected by CVE-2026-49293?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `js-toml` | npm | All versions | 1.1.1 |
| `js-toml` | npm | All versions | 1.1.1 |

Products: Sunnyadn Js-Toml.

## How do I fix CVE-2026-49293?

Upgrade js-toml to 1.1.1 or later.

## Is CVE-2026-49293 being exploited?

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

## Other vulnerabilities in sunnyadn js-toml

- [CVE-2025-54803](https://insights.sbomify.com/CVE-2025-54803/): js-toml is vulnerable to Prototype Pollution (high 7.9)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-49293 and fix it if it is affected.

What it is: 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.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-49293 exists.

Affected packages and fixed versions:
- js-toml (npm): affected all versions; fixed in 1.1.1
- js-toml (npm): affected all versions; fixed in 1.1.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-49293/ (Markdown: https://insights.sbomify.com/CVE-2026-49293/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-49293
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-49293
- OSV: https://osv.dev/vulnerability/CVE-2026-49293

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-49293/
Summaries are generated and may contain mistakes; the official description above is the record.
