CVE-2026-33228
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.
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
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 High
CVSS: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 Critical
CVSS: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 High
CVSS: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 High
CVSS: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 High
CVSS: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 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - CVSS 3.1
- 9.8 Critical
CVSS: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 High
CVSS: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 Critical
CVSS: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 High
CVSS: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 Critical
CVSS: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 High
CVSS: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 Critical
CVSS: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
- webreflection flatted
- red hat cluster observability operator 1.5.0
- red hat cryostat 4
- red hat logging subsystem for red hat openshift
- red hat multicluster engine for kubernetes
- red hat 3scale api management platform 2
- red hat advanced cluster management for kubernetes 2
- red hat amq broker 7
- red hat build of apicurio registry 2
- red hat build of keycloak
- red hat build of optaplanner 8
- red hat build of podman desktop
Show 20 moreShow less
- red hat data grid 8
- red hat developer hub 1.8
- red hat developer hub 1.9
- red hat directory server 11
- red hat directory server 12
- red hat directory server 13
- red hat enterprise linux 10
- red hat enterprise linux 8
- red hat enterprise linux 9
- red hat fuse 7
- red hat jboss enterprise application platform 7
- red hat jboss enterprise application platform 8
- red hat jboss enterprise application platform expansion pack
- red hat openshift ai (rhoai)
- red hat openshift container platform 4
- red hat process automation 7
- red hat quay 3
- red hat single sign-on 7
- red hat streams for apache kafka 2
- red hat streams for apache kafka 3
Affected packages
| Package | Affected | Fixed |
|---|---|---|
flattednpm |
through 3.4.1 | 3.4.2 |
js-jqueryAzure Linux:3 |
through 3.5.0-4 | None known |
flattedTuxCare: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 |
flattedTuxCare: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 |
flattedTuxCare: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 |
flattedTuxCare: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 |
flattedTuxCare: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 |
flattedTuxCare: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-flattedDebian: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-flattedDebian: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
| Package | Affected | Fixed |
|---|---|---|
node-flattedDebian:14 |
before 3.4.2~ds-1, plus listed versions 3.2.7~ds-13.4.1~ds-1 |
3.4.2~ds-1 |
flattednpm |
before 3.4.2 | 3.4.2 |
flattedRoot: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/flattedRoot: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-flattedUbuntu:20.04:LTS |
All versions, plus listed versions 2.0.1~dfsg-32.0.1~dfsg-4 |
None known |
node-flattedUbuntu: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-flattedUbuntu:24.04:LTS |
All versions, plus listed versions 3.2.7~ds-1 |
None known |
node-flattedUbuntu:25.10 |
All versions, plus listed versions 3.2.7~ds-1 |
None known |
node-flattedUbuntu:26.10 |
All versions, plus listed versions 3.4.2~ds-13.4.4~ds-1 |
None known |
node-flattedUbuntu:26.04:LTS |
All versions, plus listed versions 3.2.7~ds-13.4.2~ds-1 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected | ||
| facts | OSV | |
| first indexed | CVE 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
github.com/WebReflection/flatted/security/advisories/GHSA-rf6f-7fwh-wjgh
github.com/WebReflection/flatted/commit/885ddcc33cf9657caf38c57c7be45ae1c5272802
github.com/WebReflection/flatted/releases/tag/v3.4.2
access.redhat.com/security/cve/CVE-2026-33228
bugzilla.redhat.com/show_bug.cgi?id=2449872
security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-33228.json
Show 10 moreShow less
access.redhat.com/errata/RHSA-2026:34342
access.redhat.com/errata/RHSA-2026:9742
access.redhat.com/errata/RHSA-2026:13826
nvd.nist.gov/vuln/detail/CVE-2026-33228
github.com/advisories/GHSA-rf6f-7fwh-wjgh
github.com/CVEProject/cvelistV5/tree/main/cves/2026/33xxx/CVE-2026-33228.json
security-tracker.debian.org/tracker/CVE-2026-33228
github.com/WebReflection/flatted
ubuntu.com/security/CVE-2026-33228
cve.org/CVERecord?id=CVE-2026-33228