CVE-2026-27601: Underscore Package Suffers from Unlimited Recursion Vulnerability Leading to Potential DoS Attack

underscore Updated 04 Mar 2026

Summary

03/03/2026
Yes i
High
8.2

CVE-2026-27601: Underscore has unlimited recursion in _.flatten and _.isEqual, potential for DoS attack. Affects underscore versions < 1.13.8. Fixed in 1.13.8. 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 Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Underscore is a popular JavaScript utility library that provides functional programming helpers for tasks such as manipulating arrays, objects, and functions. It is widely used in web development to simplify coding tasks and improve code readability. However, versions up to 1.13.7 of Underscore are vulnerable to a critical issue that can lead to Denial of Service (DoS) attacks due to unlimited recursion in its functions.

Vulnerability Detail

The vulnerability arises from the use of recursion without a depth limit in the Underscore functions _.flatten and _.isEqual. Under specific conditions, an attacker can exploit this flaw to cause a stack overflow, resulting in application crashes. This can occur when untrusted input is used to create deeply nested data structures, which are then processed by these functions. If the application does not handle exceptions from these calls, it can lead to significant downtime, especially in server applications where continuous operation is crucial.

How To Fix

Minimum fixed version

1.13.8

This is the first release that contains the fix.

npm install underscore@1.13.8

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

Workaround

As a temporary workaround, enforce a depth limit on the data structures created from untrusted input. For example, you can limit the depth to 1000 levels to prevent stack overflow attacks. Additionally, when using _.flatten, you can pass a second argument to limit the flattening depth, like so: `

_.flatten(nested, 1000);

`.

Conclusion

The vulnerability identified as CVE-2026-27601 in the Underscore package poses a significant risk due to unlimited recursion in critical functions. Upgrading to version 1.13.8 or later is essential to mitigate this risk. Implementing workarounds can provide temporary relief while ensuring application stability.

See every vulnerability recorded for underscore →

Share this vulnerability

FAQ

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

All versions of Underscore up to and including 1.13.7 are affected by this vulnerability.

Applications that rely on continuous operation, such as server applications, are most at risk, as they can be disrupted by this vulnerability.

You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without requiring any signup.

If an immediate upgrade is not possible, implement the suggested workarounds to enforce depth limits on untrusted input and limit the flattening depth in your code.

Related vulnerabilities

Recent vulnerabilities recorded for underscore.

How To Fix

Minimum fixed version

1.13.8

This is the first release that contains the fix.

npm install underscore@1.13.8

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