CVE-2026-32141: flatted Denial of Service Vulnerability Due to Unbounded Recursion in parse() Function

flatted Updated 13 Mar 2026

Summary

13/03/2026
Yes i
High
7.5

CVE-2026-32141: flatted vulnerable to unbounded recursion DoS in parse() revive phase. Affects flatted versions < 3.4.0. Fixed in 3.4.0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

flatted is a popular npm package used for circular JSON serialization, allowing for the encoding and decoding of JavaScript objects that contain circular references. It is widely utilized in various caching and logging libraries, boasting approximately 87 million weekly downloads. The package's functionality is crucial for applications that need to handle complex data structures, but it is susceptible to specific vulnerabilities that can be exploited by attackers.

Vulnerability Detail

The vulnerability arises from the parse() function in the flatted package, which employs a recursive revive() phase to resolve circular references in deserialized JSON. When an attacker provides a specially crafted payload containing deeply nested or self-referential $ indices, the recursion depth becomes unbounded. This leads to a stack overflow, causing the Node.js process to crash. The impact is a Denial of Service (DoS), allowing an unauthenticated attacker to crash any application that processes untrusted input through flatted.parse() with a single request.

How To Fix

Latest published version: 3.4.4 as of 23 Oct 2026

npm install flatted@3.4.4

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

3.4.0

This is the first release that contains the fix.

npm install flatted@3.4.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, avoid passing untrusted input to the flatted.parse() function until you can update to the patched version. Additionally, you can implement input validation to ensure that the data being parsed does not contain deeply nested structures that could trigger the vulnerability.

Conclusion

The flatted package has a critical vulnerability (CVE-2026-32141) that can lead to Denial of Service due to unbounded recursion in its parse() function. It is essential to update to version 3.4.0 or later to mitigate this risk. Until then, avoid using untrusted input with the flatted.parse() function and consider implementing input validation.

See every vulnerability recorded for flatted →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 7.5, indicating a high severity level.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. You can check your application for this vulnerability using the Vulert playground without any signup at Vulert Scanner.

The primary consequence is a Denial of Service (DoS), where an attacker can crash your application by exploiting the vulnerability with a crafted payload.

Yes, a patch is available in version 3.4.0 of the flatted package. It is recommended to update to this version or later.

If you cannot update the package right away, ensure that you do not pass untrusted input to the flatted.parse() function and consider implementing input validation as a temporary measure.

Related vulnerabilities

Recent vulnerabilities recorded for flatted.

How To Fix

Latest published version: 3.4.4 as of 23 Oct 2026

npm install flatted@3.4.4

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

3.4.0

This is the first release that contains the fix.

npm install flatted@3.4.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback