Junglewise Threat Intelligence

CVE-2026-50029: 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 conta

CVE-2026-50029 · Severity: medium · CVSS 5.3 · Published 2026-08-14

Technologies: Sunnyadn Js-Toml. Vendors: Sunnyadn.

Executive brief

js-toml is a library used to parse TOML configuration files. A flaw in how it handles duplicate keys allows an attacker to bypass security checks by overwriting configuration values. For example, an attacker could change a 'false' security flag to a 'true' object, potentially gaining unauthorized access to administrative features or bypassing banned user restrictions.

Technical details

The js-toml interpreter contains a logic error in its duplicate-key detection state machine. It uses truthy checks (e.g., `if (object[key])`) instead of the `in` operator to verify if a key has already been defined. When a key is initially assigned a 'falsy' primitive value (such as `false`, `0`, or `""`), the check fails, allowing the key to be silently overwritten by a subsequent sub-table or array-of-tables. This results in structural type confusion where a boolean or numeric value is replaced by a truthy object. This vulnerability is reachable via dotted keys, standard table headers, and array-of-tables headers. The issue is fixed in version 1.1.2.

Affected products

  • sunnyadn js-toml <= 1.1.1

Timeline

  • 2026-05-28: disclosed
  • 2026-06-26: advisory: GitHub Advisory published

References

Related threats