CVE-2026-49293
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.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.
Weakness
- CWE-400: Uncontrolled Resource Consumption
- CWE-407: Inefficient Algorithmic Complexity
- CWE-1333: Inefficient Regular Expression Complexity
CISA SSVC decision points
| Exploitation | poc |
|---|---|
| Automatable | yes |
| Technical impact | partial |
| Scored | 2026-06-22 |
Timeline
- 2026-06-19Published by the CNA18:14 UTC
- 2026-06-22CISA SSVC decision recorded3 days after publication
- 2026-06-26GitHub advisory published (GHSA-wp3c-266w-4qfq)7 days after publication
Exploit and advisory records
GitHub advisory GHSA-wp3c-266w-4qfq, affected packages:
| Package | Vulnerable versions | Fixed in |
|---|---|---|
| npm js-toml | before 1.1.2 | 1.1.2 |
Affected products
Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| sunnyadn js-toml | before 1.1.1fixed in 1.1.1 | 1.1.1 |
References
- https://github.com/sunnyadn/js-toml/security/advisories/GHSA-wp3c-266w-4qfq
- https://github.com/sunnyadn/js-toml/commit/1e45ca56ba12e98508f8aae3e31c4aff7603d711
- https://github.com/sunnyadn/js-toml/releases/tag/v1.1.2
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2026-49293'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2026-49293'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2026-49293'curl 'https://api.contrastcyber.com/cve_products/CVE-2026-49293'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).