Every CVE Search/ Get API key

CVE-2026-33228

flatted: Prototype Pollution via parse()

8.9 HighFix available

flatted is a circular JSON parser. Prior to version 3.4.2, the parse() function in flatted can use attacker-controlled string values from the parsed JSON as direct array index keys, without validating that they are numeric. Since the internal input buffer is a JavaScript Array, accessing it with the key "proto" returns Array.prototype via the inherited getter. This object is then treated as a legitimate parsed value and assigned as a property of the output object, effectively leaking a live reference to Array.prototype to the consumer. Any code that subsequently writes to that property will pollute the global prototype. This issue has been patched in version 3.4.2.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

0.86%Up 0.8 points since Mar 21, 2026
90%50%10%1%

What each source reports

CVE List Score used 8.9

flatted: Prototype Pollution via parse()

flatted is a circular JSON parser. Prior to version 3.4.2, the parse() function in flatted can use attacker-controlled string values from the parsed JSON as direct array index keys, without validating that they are numeric. Since the internal input buffer is a JavaScript Array, accessing it with the key "proto" returns Array.prototype via the inherited getter. This object is then treated as a legitimate parsed value and assigned as a property of the output object, effectively leaking a live reference to Array.prototype to the consumer. Any code that subsequently writes to that property will pollute the global prototype. This issue has been patched in version 3.4.2.

Record
CVE-2026-33228
CVSS 4.0
8.9 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-1321, CWE-915
Updated
2026-11-02
EUVDEUVD-2026-13881 8.9

flatted is a circular JSON parser. Prior to version 3.4.2, the parse() function in flatted can use attacker-controlled string values from the parsed JSON as direct array index keys, without validating that they are numeric. Since the internal input buffer is a JavaScript Array, accessing it with the key "proto" returns Array.prototype via the inherited getter. This object is then treated as a legitimate parsed value and assigned as a property of the output object, effectively leaking a live reference to Array.prototype to the consumer. Any code that subsequently writes to that property will pollute the global prototype. This issue has been patched in version 3.4.2.

Record
EUVD-2026-13881
CVSS 4.0
8.9 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P
Updated
2026-11-02
GitHub AdvisoriesGHSA-rf6f-7fwh-wjgh 8.9

Prototype Pollution via parse() in NodeJS flatted


Summary

The parse() function in flatted can use attacker-controlled string values from the parsed JSON as direct array index keys, without validating that they are numeric. Since the internal input buffer is a JavaScript Array, accessing it with the key "__proto__" returns Array.prototype via the inherited getter. This object is then treated as a legitimate parsed value and assigned as a property of the output object, effectively leaking a live reference to Array.prototype to the consumer. Any code that subsequently writes to that property will pollute the global prototype.


Root Cause

File: esm/index.js:29 (identical in cjs/index.js)

  const resolver = (input, lazy, parsed, $) => output => {
    for (let ke = keys(output), {length} = ke, y = 0; y < length; y++) {
      const k = ke[y];
      const value = output[k];    
      if (value instanceof Primitive) {
        const tmp = input[value];      // Bug is here

No validation that value is a safe numeric index input is built as a plain Array. JavaScript's property lookup on arrays traverses the prototype chain for non-numeric keys. The key "__proto__" resolves to Array.prototype, which:

  • has type "object" → passes the typeof tmp === object guard at line 30
  • is not in the parsed Set yet → passes the !parsed.has(tmp) guard.
  • The reference to Array.prototype is then enqueued in lazy and later unconditionally assigned to the output object.

Replication Steps

  const Flatted = require('flatted'); 
  const parsed = Flatted.parse('[{"x":"__proto__"}]');
  parsed.x.polluted = 'pwned';
  console.log([].polluted);  // Returns true

Impact An attacker can supply a crafted flatted string to parse() that causes the returned object to hold a live reference to Array.prototype, enabling any downstream code that writes to that property to pollute the global prototype chain, potentially causing denial of service or code execution.

Recommended solution Validate that the index string represents an integer within the bounds of input before accessing it:

// Before (vulnerable) const tmp = input[value];

// After (safe) const idx = +value; // coerce boxed String → number const tmp = (Number.isInteger(idx) && idx >= 0 && idx < input.length) ? input[idx] : undefined;

Record
GHSA-rf6f-7fwh-wjgh
CVSS 4.0
8.9 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P
Weakness
CWE-915, CWE-1321
Updated
2026-11-02
NVD 8.9

flatted is a circular JSON parser. Prior to version 3.4.2, the parse() function in flatted can use attacker-controlled string values from the parsed JSON as direct array index keys, without validating that they are numeric. Since the internal input buffer is a JavaScript Array, accessing it with the key "proto" returns Array.prototype via the inherited getter. This object is then treated as a legitimate parsed value and assigned as a property of the output object, effectively leaking a live reference to Array.prototype to the consumer. Any code that subsequently writes to that property will pollute the global prototype. This issue has been patched in version 3.4.2.

Record
CVE-2026-33228
CVSS 4.0
8.9 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-1321, CWE-915
Updated
2026-11-02
OSV 8.9

flatted: Prototype Pollution via parse()

flatted is a circular JSON parser. Prior to version 3.4.2, the parse() function in flatted can use attacker-controlled string values from the parsed JSON as direct array index keys, without validating that they are numeric. Since the internal input buffer is a JavaScript Array, accessing it with the key "proto" returns Array.prototype via the inherited getter. This object is then treated as a legitimate parsed value and assigned as a property of the output object, effectively leaking a live reference to Array.prototype to the consumer. Any code that subsequently writes to that property will pollute the global prototype. This issue has been patched in version 3.4.2.

Record
CVE-2026-33228
CVSS 4.0
8.9 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P
Weakness
CWE-1321
Updated
2026-11-02
OSVDEBIAN-CVE-2026-33228 9.8

flatted is a circular JSON parser. Prior to version 3.4.2, the parse() function in flatted can use attacker-controlled string values from the parsed JSON as direct array index keys, without validating that they are numeric. Since the internal input buffer is a JavaScript Array, accessing it with the key "proto" returns Array.prototype via the inherited getter. This object is then treated as a legitimate parsed value and assigned as a property of the output object, effectively leaking a live reference to Array.prototype to the consumer. Any code that subsequently writes to that property will pollute the global prototype. This issue has been patched in version 3.4.2.

Record
DEBIAN-CVE-2026-33228
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
Show 10 moreShow less
OSVGHSA-rf6f-7fwh-wjgh 8.9

Prototype Pollution via parse() in NodeJS flatted


Summary

The parse() function in flatted can use attacker-controlled string values from the parsed JSON as direct array index keys, without validating that they are numeric. Since the internal input buffer is a JavaScript Array, accessing it with the key "__proto__" returns Array.prototype via the inherited getter. This object is then treated as a legitimate parsed value and assigned as a property of the output object, effectively leaking a live reference to Array.prototype to the consumer. Any code that subsequently writes to that property will pollute the global prototype.


Root Cause

File: esm/index.js:29 (identical in cjs/index.js)

  const resolver = (input, lazy, parsed, $) => output => {
    for (let ke = keys(output), {length} = ke, y = 0; y < length; y++) {
      const k = ke[y];
      const value = output[k];    
      if (value instanceof Primitive) {
        const tmp = input[value];      // Bug is here

No validation that value is a safe numeric index input is built as a plain Array. JavaScript's property lookup on arrays traverses the prototype chain for non-numeric keys. The key "__proto__" resolves to Array.prototype, which:

  • has type "object" → passes the typeof tmp === object guard at line 30
  • is not in the parsed Set yet → passes the !parsed.has(tmp) guard.
  • The reference to Array.prototype is then enqueued in lazy and later unconditionally assigned to the output object.

Replication Steps

  const Flatted = require('flatted'); 
  const parsed = Flatted.parse('[{"x":"__proto__"}]');
  parsed.x.polluted = 'pwned';
  console.log([].polluted);  // Returns true

Impact An attacker can supply a crafted flatted string to parse() that causes the returned object to hold a live reference to Array.prototype, enabling any downstream code that writes to that property to pollute the global prototype chain, potentially causing denial of service or code execution.

Recommended solution Validate that the index string represents an integer within the bounds of input before accessing it:

// Before (vulnerable) const tmp = input[value];

// After (safe) const idx = +value; // coerce boxed String → number const tmp = (Number.isInteger(idx) && idx >= 0 && idx < input.length) ? input[idx] : undefined;

Record
GHSA-rf6f-7fwh-wjgh
CVSS 4.0
8.9 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P
Weakness
CWE-1321, CWE-915
Updated
2026-11-02
OSVROOT-APP-NPM-CVE-2026-33228 9.8

CVE-2026-33228 in flatted - Patched by Root

Root has patched CVE-2026-33228 in the flatted package for Root:npm. Multiple fixed versions available.

Record
ROOT-APP-NPM-CVE-2026-33228
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVUBUNTU-CVE-2026-33228 8.9

flatted is a circular JSON parser. Prior to version 3.4.2, the parse() function in flatted can use attacker-controlled string values from the parsed JSON as direct array index keys, without validating that they are numeric. Since the internal input buffer is a JavaScript Array, accessing it with the key "proto" returns Array.prototype via the inherited getter. This object is then treated as a legitimate parsed value and assigned as a property of the output object, effectively leaking a live reference to Array.prototype to the consumer. Any code that subsequently writes to that property will pollute the global prototype. This issue has been patched in version 3.4.2.

Record
UBUNTU-CVE-2026-33228
CVSS 4.0
8.9 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVAZL-80309 No score

CVE-2026-33228 affecting package js-jquery 3.5.0-4

flatted is a circular JSON parser. Prior to version 3.4.2, the parse() function in flatted can use attacker-controlled string values from the parsed JSON as direct array index keys, without validating that they are numeric. Since the internal input buffer is a JavaScript Array, accessing it with the key "proto" returns Array.prototype via the inherited getter. This object is then treated as a legitimate parsed value and assigned as a property of the output object, effectively leaking a live reference to Array.prototype to the consumer. Any code that subsequently writes to that property will pollute the global prototype. This issue has been patched in version 3.4.2.

Record
AZL-80309
Updated
2026-11-05
OSVCLSA-2026-1776299659 No score

TuxCare security update for flatted (2 CVEs)

TuxCare rebuilt flatted to address 2 CVEs. Fixed in 2.0.2-tuxcare.1.

Record
CLSA-2026-1776299659
Updated
2026-11-02
OSVCLSA-2026-1779410883 No score

TuxCare security update for flatted (2 CVEs)

TuxCare rebuilt flatted to address 2 CVEs. Fixed in 3.3.3-tuxcare.1.

Record
CLSA-2026-1779410883
Updated
2026-11-02
OSVCLSA-2026-1781830591 No score

TuxCare security update for flatted (2 CVEs)

TuxCare rebuilt flatted to address 2 CVEs. Fixed in 3.2.9-tuxcare.1.

Record
CLSA-2026-1781830591
Updated
2026-11-02
OSVCLSA-2026-1781830592 No score

TuxCare security update for flatted (2 CVEs)

TuxCare rebuilt flatted to address 2 CVEs. Fixed in 3.3.2-tuxcare.1.

Record
CLSA-2026-1781830592
Updated
2026-11-02
OSVCLSA-2026-1781830593 No score

TuxCare security update for flatted (2 CVEs)

TuxCare rebuilt flatted to address 2 CVEs. Fixed in 3.3.1-tuxcare.1.

Record
CLSA-2026-1781830593
Updated
2026-11-02
OSVCLSA-2026-1791278813 No score

TuxCare security update for flatted (1 CVE)

TuxCare rebuilt flatted to address 1 CVE. Fixed in 2.0.0-tuxcare.1.

Record
CLSA-2026-1791278813
Updated
2026-11-02

Affected products

Show 20 moreShow less

Affected packages

Affected packages
PackageAffectedFixed
flatted
npm
through 3.4.1
3.4.2
js-jquery
Azure Linux:3
through 3.5.0-4 None known
flatted
TuxCare:npm
From an advisory covering 2 CVEs
2.0.2-tuxcare.0 up to 2.0.2-tuxcare.1, plus listed versions
2.0.2
2.0.2-tuxcare.1
flatted
TuxCare:npm
From an advisory covering 2 CVEs
3.3.3-tuxcare.0 up to 3.3.3-tuxcare.1, plus listed versions
3.3.3
3.3.3-tuxcare.1
flatted
TuxCare:npm
From an advisory covering 2 CVEs
3.2.9-tuxcare.0 up to 3.2.9-tuxcare.1, plus listed versions
3.2.9
3.2.9-tuxcare.1
flatted
TuxCare:npm
From an advisory covering 2 CVEs
3.3.2-tuxcare.0 up to 3.3.2-tuxcare.1, plus listed versions
3.3.2
3.3.2-tuxcare.1
flatted
TuxCare:npm
From an advisory covering 2 CVEs
3.3.1-tuxcare.0 up to 3.3.1-tuxcare.1, plus listed versions
3.3.1
3.3.1-tuxcare.1
flatted
TuxCare:npm
2.0.0-tuxcare.0 up to 2.0.0-tuxcare.1, plus listed versions
2.0.0
2.0.0-tuxcare.1
node-flatted
Debian:12
All versions, plus listed versions
3.2.7~ds-13.2.7~ds-1+deb12u13.4.1~ds-13.4.2~ds-13.4.4~ds-1
None known
node-flatted
Debian:13
before 3.2.7~ds-1+deb13u1, plus listed versions
3.2.7~ds-1
3.2.7~ds-1+deb13u1
Show 10 moreShow less
Affected packages
PackageAffectedFixed
node-flatted
Debian:14
before 3.4.2~ds-1, plus listed versions
3.2.7~ds-13.4.1~ds-1
3.4.2~ds-1
flatted
npm
before 3.4.2
3.4.2
flatted
Root:npm
before 3.3.1-aikido.3
3.3.1-aikido.33.4.1-aikido.23.3.3-aikido.32.0.2-aikido.23.3.2-aikido.43.2.7-aikido.23.2.5-aikido.13.2.9-aikido.23.2.7-aikido.13.2.2-aikido.2
@rootio/flatted
Root:npm
before 3.3.1-root.io.2
3.3.1-root.io.23.3.3-root.io.23.3.2-root.io.33.4.1-root.io.12.0.2-root.io.13.3.1-root.io.33.4.1-root.io.23.3.3-root.io.32.0.2-root.io.23.3.2-root.io.43.2.7-root.io.23.2.5-root.io.13.2.9-root.io.23.2.7-root.io.13.2.2-root.io.2
node-flatted
Ubuntu:20.04:LTS
All versions, plus listed versions
2.0.1~dfsg-32.0.1~dfsg-4
None known
node-flatted
Ubuntu:22.04:LTS
All versions, plus listed versions
2.0.2~dfsg-12.0.2~dfsg-43.2.2~ds-23.2.2~ds-33.2.4~ds-13.2.5~ds-1
None known
node-flatted
Ubuntu:24.04:LTS
All versions, plus listed versions
3.2.7~ds-1
None known
node-flatted
Ubuntu:25.10
All versions, plus listed versions
3.2.7~ds-1
None known
node-flatted
Ubuntu:26.10
All versions, plus listed versions
3.4.2~ds-13.4.4~ds-1
None known
node-flatted
Ubuntu:26.04:LTS
All versions, plus listed versions
3.2.7~ds-13.4.2~ds-1
None known

History

History
RecordedChangedSources
affected
factsOSV
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2026-33228 is a high vulnerability (CVSS 8.9) in Webreflection Flatted, published March 19, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.86%, the 58th percentile. Fixed in flatted 3.4.2.

References

Show 10 moreShow less
MoveEnter Open