Vulnerabilities/

Prototype Pollution via parse() in NodeJS flatted

Severity:
High

Description


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.

Recommendation

Update the flatted package to the latest compatible version. Followings are version details:

References

Related Issues

Tags:
npm
flatted
Anything's wrong? Let us know Last updated on March 25, 2026