REDHAT-BUG-2449872: Npm/flatted vulnerability
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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
flattedto a version that resolves this vulnerability.Fixed in 3.4.2
Event History
Frequently Asked Questions
What is the severity of REDHAT-BUG-2449872?
The severity of REDHAT-BUG-2449872 is rated at 55.
How do I fix REDHAT-BUG-2449872?
To fix REDHAT-BUG-2449872, upgrade the flatted npm package to version 3.4.2 or later.
What software is affected by REDHAT-BUG-2449872?
The affected software is the npm package flatted, specifically versions prior to 3.4.2.
What are the risks associated with REDHAT-BUG-2449872?
The risks associated with REDHAT-BUG-2449872 include potential exploitation through attacker-controlled string values used as array index keys.
When was REDHAT-BUG-2449872 published?
REDHAT-BUG-2449872 was published on March 21, 2026.