BinaryMuse toml-node
toml-node: Prototype pollution: parsing a TOML document can write to Object.prototype
toml-node is a TOML parser for Node.js and the browser. Prior to 5.0.1, toml.parse() can write attacker-controlled properties to Object.prototype because quoteDottedString() in lib/compiler.js produces the same bookkeeping string for distinct quoted key paths, allowing addTableArray() to clear another key's guard. The assign() path then descends through an unowned Date value without applying the owned-container check and can reach the prototype chain. Objects created elsewhere in the process can inherit the injected property. 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.