{"id":"CVE-2026-49293","published":"2026-06-19T18:14:20Z","modified":"2026-11-04T03:42:15Z","title":"CPU exhaustion via O(n^2) BigInt construction on radix-prefixed integer literals","vendor":"sunnyadn","product":"js-toml","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.5,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00644,"percentile":0.51816,"provenance":"source"},"cwes":[{"id":"CWE-400","name":"Uncontrolled Resource Consumption"},{"id":"CWE-407","name":"Inefficient Algorithmic Complexity"},{"id":"CWE-1333","name":"Inefficient Regular Expression Complexity"}],"references":[{"url":"https://github.com/sunnyadn/js-toml/security/advisories/GHSA-wp3c-266w-4qfq","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/sunnyadn/js-toml/commit/1e45ca56ba12e98508f8aae3e31c4aff7603d711","tags":["x_refsource_MISC"]},{"url":"https://github.com/sunnyadn/js-toml/releases/tag/v1.1.2","tags":["x_refsource_MISC"]}],"priority":{"score":15.6,"factors":[{"name":"EPSS percentile","points":10.36},{"name":"CVSS severity","points":5.25}]},"vendorSlug":"sunnyadn","affectedVersions":[{"vendor":"sunnyadn","product":"js-toml","versions":["< 1.1.2"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial","timestamp":"2026-06-22T14:09:42.727540Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"js-toml","vulnerableRanges":["<1.1.2"],"patched":["1.1.2"],"from":["GHSA-wp3c-266w-4qfq"],"provenance":"source"}],"euvd":{"id":"EUVD-2026-38060","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2025-54803","published":"2025-08-05","fixed":"1.0.2","kev":false,"link":{"from":"CVE-2025-54803","to":"CVE-2026-49293","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:js-toml","fromFixed":"1.0.2","toFixed":"1.1.2","daysApart":318}]}},{"cve":"CVE-2026-49293","published":"2026-06-19","fixed":"1.1.2","kev":false},{"cve":"CVE-2026-50029","published":"2026-08-14","fixed":"1.1.2","kev":false},{"cve":"CVE-2026-63386","published":"2026-09-22","fixed":"1.1.3","kev":false}],"package":"npm:js-toml"}}