---
id: CVE-2026-55091
title: >-
  flat-to-nested converts a hierarchy from a flat representation to a nested
  representation
summary: >-
  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…
severity: high
cvss: 7.5
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N'
cwe:
  - CWE-915
  - CWE-1321
vendor: joaonuno
product: flat-to-nested-js
affected:
  - flat-to-nested-js < 1.1.2
patched:
  - flat-to-nested 1.1.2
published: '2026-09-14'
updated: '2026-09-14'
sourceUpdated: '2026-09-14T20:16:47.163'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-55091'
references:
  - url: >-
      https://github.com/joaonuno/flat-to-nested-js/commit/680a5ebe1194edda16fa93baaa56ff14fe0e3d7f
    label: security-advisories@github.com
  - url: 'https://github.com/joaonuno/flat-to-nested-js/releases/tag/v1.1.2'
    label: security-advisories@github.com
  - url: >-
      https://github.com/joaonuno/flat-to-nested-js/security/advisories/GHSA-hp36-v28f-w3r4
    label: security-advisories@github.com
  - url: 'https://github.com/advisories/GHSA-hp36-v28f-w3r4'
tags:
  - nvd
  - cve.org
  - ghsa
  - npm
ssvc:
  exploitation: none
  automatable: 'yes'
  technicalImpact: partial
  timestamp: '2026-09-14T19:22:11.687253Z'
ecosystem: npm
ingestedAt: '2026-06-22T13:35:24.388Z'
epss: 0.00355
epssPercentile: 0.29342
---

## Overview

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.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.

## Package advisory (CVE-2026-55091)

Affected packages:

- `flat-to-nested <= 1.1.1`

Patched in:

- `flat-to-nested 1.1.2`

Source: https://github.com/advisories/GHSA-hp36-v28f-w3r4
