flatted: Prototype Pollution via parse()
Description
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
flattednpm | < 3.4.2 | 3.4.2 |
Affected products
19- osv-coords18 versionspkg:apk/chainguard/arangodb-3.11pkg:apk/chainguard/eslintpkg:apk/chainguard/langfuse-2-workerpkg:apk/chainguard/langfuse-3-workerpkg:apk/chainguard/langfuse-fips-2-workerpkg:apk/chainguard/langfuse-fips-3-workerpkg:apk/chainguard/librechatpkg:apk/chainguard/prismpkg:apk/chainguard/renovatepkg:apk/chainguard/vitess-22pkg:apk/chainguard/vitess-23pkg:apk/wolfi/eslintpkg:apk/wolfi/langfuse-3-workerpkg:apk/wolfi/prismpkg:apk/wolfi/renovatepkg:apk/wolfi/vitess-22pkg:apk/wolfi/vitess-23pkg:npm/flatted
< 3.11.14.3-r4+ 17 more
- (no CPE)range: < 3.11.14.3-r4
- (no CPE)range: < 10.1.0-r0
- (no CPE)range: < 2.95.12-r16
- (no CPE)range: < 3.163.0-r0
- (no CPE)range: < 2.95.12-r19
- (no CPE)range: < 3.162.0-r1
- (no CPE)range: < 0.8.4-r3
- (no CPE)range: < 5.14.3-r13
- (no CPE)range: < 43.84.0-r1
- (no CPE)range: < 22.0.4-r9
- (no CPE)range: < 23.0.3-r9
- (no CPE)range: < 10.1.0-r0
- (no CPE)range: < 3.163.0-r0
- (no CPE)range: < 5.14.3-r13
- (no CPE)range: < 43.84.0-r1
- (no CPE)range: < 22.0.4-r9
- (no CPE)range: < 23.0.3-r9
- (no CPE)range: < 3.4.2
- WebReflection/flattedv5Range: < 3.4.2
Patches
Vulnerability mechanics
References
5- github.com/advisories/GHSA-rf6f-7fwh-wjghghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-33228ghsaADVISORY
- github.com/WebReflection/flatted/commit/885ddcc33cf9657caf38c57c7be45ae1c5272802ghsax_refsource_MISCWEB
- github.com/WebReflection/flatted/releases/tag/v3.4.2ghsax_refsource_MISCWEB
- github.com/WebReflection/flatted/security/advisories/GHSA-rf6f-7fwh-wjghghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.