BinaryMuse toml-node
toml-node: Quadratic-complexity DoS via long dotted keys or table paths in toml.parse()
toml-node is a TOML parser for Node.js and the browser. Prior to 5.0.1, toml.parse() repeatedly slices and rejoins every path prefix in lib/compiler.js while processing long dotted keys, table headers, array-of-tables headers, and inline-table keys in assign(), deepRef(), and setNestedKey(). The resulting quadratic work can block the Node.js event loop for several seconds, and sufficiently long paths can terminate the process through memory exhaustion. The maxDepth option does not limit key-segment count and therefore does not mitigate this path. This issue is fixed in version 5.0.1.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 5.0.1
Fixed in 5.0.1
Mitigation
Upgrade toml-node to 5.0.1 or later.
References
- Vendor advisory github.com/BinaryMuse/toml-node/security/advis…
- Patch github.com/BinaryMuse/toml-node/commit/609c873…
- Release notes github.com/BinaryMuse/toml-node/releases/tag/v…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.