{"id":"CVE-2026-50029","published":"2026-08-14T19:08:54Z","modified":"2026-08-17T19:34:15Z","title":"js-toml has silent type confusion via falsy-primitive duplicate-key bypass","vendor":"sunnyadn","product":"js-toml","tier":"tail","description":{"text":"js-toml is a TOML parser for JavaScript, Prior to version 1.1.2, the interpreter checks whether a key already exists in a parser-built container with `if (object[key])` instead of `if (key in object)`. When the prior value is a falsy primitive — `false`, `0`, `0n`, `0.0`, `-0`, or `\"\"` — the duplicate-key branch is skipped and the value is silently overwritten by a later sub-table, dotted-key sub-table, or array-of-tables sharing the same name. Per the TOML 1.0.0 spec (\"Defining a key multiple times is invalid\"; \"You cannot define any key or table more than once\"), this should be a parse error. The result is structural type confusion of attacker-named keys in the value returned by `load()`. A boolean-typed `false` (or numeric `0`) becomes a truthy object. Host applications that gate behavior on `if (config.flag)`, `if (!user.banned)`, `if (config.allowDelete)`, or `if (config.publicMode)` will silently take the truthy branch. This is distinct from GHSA-65fc-cr5f-v7r2 (the 1.0.2 prototype-pollution fix). `Object.prototype` is not polluted. The `Object.create(null)` mitigation from 1.0.2 is intact; the bug here is in the duplicate-key state machine, not in container construction. Version 1.1.2 patches the incorrect comparison.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.3,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00398,"percentile":0.34928,"provenance":"source"},"cwes":[{"id":"CWE-697","name":"Incorrect Comparison"}],"references":[{"url":"https://github.com/sunnyadn/js-toml/security/advisories/GHSA-m34p-749j-x6m6","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/sunnyadn/js-toml/commit/e0504fa5d3dcde2d1d588c9001c24b7b700beeeb","tags":["x_refsource_MISC"]},{"url":"https://github.com/sunnyadn/js-toml/releases/tag/v1.1.2","tags":["x_refsource_MISC"]}],"priority":{"score":10.7,"factors":[{"name":"EPSS percentile","points":6.99},{"name":"CVSS severity","points":3.71}]},"vendorSlug":"sunnyadn","affectedVersions":[{"vendor":"sunnyadn","product":"js-toml","versions":["< 1.1.2"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial","timestamp":"2026-08-17T19:34:09.834226Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"js-toml","vulnerableRanges":["<1.1.2"],"patched":["1.1.2"],"from":["GHSA-m34p-749j-x6m6"],"provenance":"source"}],"summary":{"text":"js-toml, a TOML parser for JavaScript, mishandles duplicate-key detection in its parser-built containers: it checks existing keys with a truthiness test rather than a key-presence test, so a prior falsy primitive such as false, 0, or \"\" is silently overwritten by a later table or array-of-tables with the same name.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:02:11Z"},"euvd":{"id":"EUVD-2026-58791","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-sunnyadn-js-toml-cve-2025-54803","parents":[{"from":"CVE-2025-54803","to":"CVE-2026-50029","relation":"successor","confidence":"high","kind":"lineage","evidence":[{"kind":"version-step","provenance":"source","package":"npm:js-toml","fromFixed":"1.0.2","toFixed":"1.1.2","daysApart":374},{"kind":"same-code","provenance":"machine","files":["src/load/interpreter.ts"],"commits":["https://github.com/sunnyadn/js-toml/commit/b125910a3f094b744c9c3571360d4b9e3a472f66","https://github.com/sunnyadn/js-toml/commit/e0504fa5d3dcde2d1d588c9001c24b7b700beeeb"],"basis":"shared function","functions":["Interpreter"]}]}],"children":[{"from":"CVE-2026-50029","to":"CVE-2026-63386","relation":"successor","confidence":"high","kind":"lineage","evidence":[{"kind":"version-step","provenance":"source","package":"npm:js-toml","fromFixed":"1.1.2","toFixed":"1.1.3","daysApart":39},{"kind":"same-code","provenance":"machine","files":["src/load/interpreter.ts"],"commits":["https://github.com/sunnyadn/js-toml/commit/e0504fa5d3dcde2d1d588c9001c24b7b700beeeb","https://github.com/sunnyadn/js-toml/commit/4e10acf1f99ff3cb443c58b8f0a57664e41e87c6"],"basis":"shared function","functions":["Interpreter"]}]}],"packageHistory":[{"cve":"CVE-2025-54803","published":"2025-08-05","fixed":"1.0.2","kev":false},{"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"}}