CVE-2026-55091
nichePrototype Pollution in flat-to-nested npm Library Before 1.1.2
flat-to-nested, an npm library that converts flat record lists into nested hierarchies, contains a prototype pollution flaw (CWE-915/CWE-1321) in FlatToNested.prototype.convert in index.js. The function uses attacker-supplied id and parent record fields directly as keys on plain JavaScript objects (temp and pendingChildOf), so a record whose id or parent is __proto__ causes temp[parent] to resolve to Object.prototype, and initPush() writes attacker-controlled data to the inherited children property (with constructor and prototype being similarly unsafe key values). Any application that passes attacker-influenced flat records to convert() can expose unrelated objects to polluted inherited state, causing application-logic corruption, denial of service, or greater impact if a downstream prototype-pollution gadget is present. The flaw affects all versions before 1.1.2 and is fixed in 1.1.2; it is rated High at CVSS 3.1 7.5 with high integrity impact. No public PoC or in-the-wild exploitation is known, and it is not listed in the CISA KEV catalog.
What to do: Upgrade flat-to-nested to version 1.1.2 or later. If immediate upgrade is not possible, validate that id and parent values passed to convert() are never __proto__, constructor, or prototype before invoking the library. Audit your code paths to confirm whether attacker-reachable input flows into convert(), and check your dependency tree for downstream prototype-pollution gadgets that could amplify this into code execution or broader integrity compromise.
| flat-to-nested maintainers (npm) flat-to-nested | < 1.1.2 |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
flat-to-nested converts a hierarchy from a flat representation to a nested representation. Prior to 1.1.2, FlatToNested.prototype.convert in index.js uses attacker-influenced id and parent record fields directly as keys in the plain temp and pendingChildOf objects. When parent or id is __proto__, temp[parent] can resolve to Object.prototype, and initPush() can write attacker-controlled data to the global children prototype property while existing prototype methods remain intact. Any application that passes attacker-influenced flat records to convert() can therefore expose unrelated objects to polluted inherited state, causing application-logic corruption or denial of service and potentially enabling greater impact when a downstream prototype-pollution gadget is present. The constructor and prototype strings are also unsafe inherited-key values in the same lookup design. This issue is fixed in version 1.1.2.
- Weakness
- CWE-915, CWE-1321
- Vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
In the news0 stories
No ingested article mentions this CVE yet.