toml is vulnerable to Denial of Service (DoS)
65
CVE Score
Medium
Denial of Service (DoS)
toml.parse() takes quadratic time on a single long dotted key, table header, or inline table key because assign(), deepRef(), and setNestedKey() each recompute the full path prefix string from scratch on every segment. A roughly 100KB crafted document causes a synchronous hang lasting multiple seconds, and a roughly 200KB document crashes the Node.js process with an unrecoverable out of memory error. The existing maxDepth nesting depth guard does not apply because the key is long and does not nest. The fix removes the repeated path recomputation so each key resolves in time proportional to its own length.
Upgrade the toml library to the patch version.
You are affected if you are using a version that falls within the vulnerable range.
4.1.2 - 5.0.0
Fixed in 5.0.1toml is vulnerable to Denial of Service (DoS) in versions 4.1.2 - 5.0.0.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.