# CVE-2026-27601: Underscore.js has unlimited recursion in _.flatten and _.isEqual, potential for DoS attack

> An attacker can cause a Denial of Service via stack overflow in Underscore.js by passing deeply nested untrusted data to specific functions without depth limits.

- **Severity:** High 8.2 (`CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 3 Mar 2026
- **Updated:** 4 Mar 2026
- **Also known as:** AZL-79313, AZL-79320, AZL-79323, AZL-79340, AZL-79343, AZL-79397, AZL-79401, AZL-79404, AZL-79427, AZL-79434, AZL-79463, CLEANSTART-2026-XN28189, CLEANSTART-2026-ZP55768, CLSA-2026-1792767555, DEBIAN-CVE-2026-27601, ECHO-0638-253e-d3ec, GHSA-qpx9-hpmf-5gmw, MINI-p855-9chv-j5f4, OESA-2026-1578, OESA-2026-1579, OESA-2026-1580, OESA-2026-1581, ROOT-APP-NPM-CVE-2026-27601, ROOT-OS-DEBIAN-12-CVE-2026-27601, UBUNTU-CVE-2026-27601, openSUSE-SU-2026:10427-1, openSUSE-SU-2026:10440-1

## What is CVE-2026-27601?

CVE-2026-27601 is a high-severity denial of service vulnerability in jashkenas underscore, published on 3 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Underscore.js is a utility-belt library for JavaScript. Prior to 1.13.8, the _.flatten and _.isEqual functions use recursion without a depth limit. Under very specific conditions, detailed below, an attacker could exploit this in a Denial of Service (DoS) attack by triggering a stack overflow. Untrusted input must be used to create a recursive datastructure, for example using JSON.parse, with no enforced depth limit. The datastructure thus created must be passed to _.flatten or _.isEqual. In the case of _.flatten, the vulnerability can only be exploited if it is possible for a remote client to prepare a datastructure that consists of arrays at all levels AND if no finite depth limit is passed as the second argument to _.flatten. In the case of _.isEqual, the vulnerability can only be exploited if there exists a code path in which two distinct datastructures that were submitted by the same remote client are compared using _.isEqual. For example, if a client submits data that are stored in a database, and the same client can later submit another datastructure that is then compared to the data that were saved in the database previously, OR if a client submits a single request, but its data are parsed twice, creating two non-identical but equivalent datastructures that are then compared. Exceptions originating from the call to _.flatten or _.isEqual, as a result of a stack overflow, are not being caught. This vulnerability is fixed in 1.13.8.

Weakness: CWE-770 (Allocation of Resources Without Limits or Throttling)

## Which versions are affected by CVE-2026-27601?

2 open source packages ship an affected version, including underscore. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `underscore` | npm | All versions | 1.13.8 |
| `underscore` | npm | All versions | 1.13.8 |
| `python-ipympl` | openSUSE:Tumbleweed | All versions | 0.9.7-17.1 |
| `python-nbclassic` | openSUSE:Tumbleweed | All versions | 1.3.3-1.1 |

Products: Underscorejs Underscore.

## How do I fix CVE-2026-27601?

Upgrade underscore to 1.13.8 or later.

## Is CVE-2026-27601 being exploited?

There is no known exploitation of CVE-2026-27601 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-27601 and fix it if it is affected.

What it is: CVE-2026-27601 is a high-severity denial of service vulnerability in jashkenas underscore, published on 3 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-27601 in the wild and no public exploit code.

Affected packages and fixed versions:
- underscore (npm): affected all versions; fixed in 1.13.8
- underscore (npm): affected all versions; fixed in 1.13.8

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-27601/ (Markdown: https://insights.sbomify.com/CVE-2026-27601/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-27601
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-27601
- OSV: https://osv.dev/vulnerability/CVE-2026-27601

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-27601/
Summaries are generated and may contain mistakes; the official description above is the record.
