CVE-2026-27601
Medium · 5.9CVSS
5.9
EPSS
1.0%
Published
Mar 3, 2026
CISA due date
—
Cloudanix analysis
A widely used JavaScript component can be crashed by specially shaped input, potentially making affected applications unavailable until they are updated or protected.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Moderate
- Impact
- Denial Of Service
- Component
- Library
- Class
- Denial of service
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Underscore.js versions prior to 1.13.8 can recurse without a depth limit in _.flatten and _.isEqual. If an application accepts attacker-controlled nested data structures and passes them into these functions under the required conditions, the recursive calls can exhaust the JavaScript call stack and raise an uncaught stack overflow exception. In server-side JavaScript applications, this can terminate the request handler, worker, or process depending on runtime and error handling, causing denial of service. The issue does not provide code execution, data disclosure, or data modification by itself; the primary impact is availability loss.
Why it matters to the business
Applications that use vulnerable Underscore.js versions may be taken offline or made unreliable by specially crafted deeply nested input. Because Underscore is a widely used JavaScript utility dependency, exposure may exist indirectly through transitive packages as well as direct imports. The vulnerability has a moderate CVSS score and low EPSS probability, but public exploit information is available, so internet-facing APIs that process untrusted JSON or similar structured input should be prioritized for review and upgrade.
How an attack unfolds
An attacker identifies an endpoint or workflow that accepts user-controlled structured input, such as JSON arrays or objects, without enforcing a maximum nesting depth. The attacker submits data crafted to create an extremely deep recursive structure. For _.flatten exploitation, the data must consist of arrays at each level and the application must call _.flatten without a finite depth limit. For _.isEqual exploitation, the attacker must cause two separate but equivalent deeply nested structures under their control to be compared, such as by submitting one structure for storage and later submitting another for comparison, or by triggering code that parses the same payload twice and compares the resulting objects. When vulnerable Underscore.js code recursively traverses the structures, the JavaScript call stack is exhausted. If the resulting exception is not caught, the process, worker, or request path can fail, producing a denial-of-service condition.
How to fix it
Upgrade Underscore.js to version 1.13.8 or later wherever it is used directly or transitively. Regenerate dependency lockfiles and rebuild/redeploy affected applications so the fixed package is actually loaded at runtime. If immediate upgrade is not possible, enforce strict maximum depth and size limits on untrusted JSON or other structured input before it reaches application logic; reject excessively nested arrays and objects; pass a finite depth argument when using _.flatten; avoid comparing attacker-controlled deeply nested structures with _.isEqual; and ensure stack overflow or RangeError exceptions are caught so a single malformed request cannot terminate a service process. Apply rate limiting and request body size limits as defense-in-depth for exposed APIs.
How to confirm the fix worked
Confirm that all dependency manifests, lockfiles, software composition analysis results, and runtime deployments show Underscore.js version 1.13.8 or later. Search for direct imports or bundled copies of Underscore, including vendored browser bundles and transitive dependency trees. Review code paths that call _.flatten or _.isEqual on request-derived, message-derived, or otherwise untrusted data. Test representative endpoints with safe, controlled deeply nested payloads in a non-production environment to verify that requests are rejected by validation controls or handled without process termination. Confirm application logs no longer show uncaught stack overflow exceptions from underscore functions after remediation.
Typical attack path
- Discover an application endpoint that accepts attacker-controlled JSON or similar structured input.
- Send test payloads with increasing nesting depth to determine whether deep structures are accepted.
- Identify behavior indicating use of Underscore.js recursion, such as stack overflow errors, request crashes, or service restarts when nested arrays or objects are submitted.
- For _.flatten paths, submit a deeply nested all-array payload where the application calls _.flatten without a finite depth argument.
- For _.isEqual paths, cause two attacker-controlled deeply nested structures to be compared through a stored-then-compared workflow or repeated parsing/comparison behavior.
- Trigger call stack exhaustion, resulting in uncaught RangeError or stack overflow exceptions and service degradation or outage.
How to detect it
To assess possible prior exploitation, review application logs, API gateway logs, web server logs, process supervisor logs, container orchestration events, and APM/error-monitoring telemetry for stack overflow exceptions correlated with requests containing very deeply nested arrays or objects. Look for repeated HTTP 500 responses, worker exits, container restarts, Node.js process crashes, memory/CPU spikes, or sudden availability drops following unusually large or deeply nested JSON submissions. In JavaScript error traces, focus on RangeError or stack overflow messages with stack frames referencing underscore, flatten, isEqual, baseFlatten, or eq. For API logs that retain request metadata or payload samples, search for suspiciously repeated bracket patterns, extreme nesting, oversized JSON bodies, or requests that precede crashes. Exploitation is application-path dependent, so absence of a generic network signature does not rule out abuse; correlate crash telemetry with source IPs, user agents, request paths, and payload characteristics.
- RangeError: Maximum call stack size exceeded
- InternalError: too much recursion
- Maximum call stack size exceeded
- too much recursion
- underscore.js
- underscore-min.js
- node_modules/underscore/underscore.js
- node_modules/underscore/modules/flatten.js
- node_modules/underscore/modules/isEqual.js
- _.flatten
- _.isEqual
- baseFlatten
- isEqual
- eq(a, b, aStack, bStack)
- "underscore":"<1.13.8"
- "underscore": "<1.13.8"
- underscore@1.13.7
- underscore@1.13.6
- underscore@1.13.5
What your security team should do
- Inventory all applications and packages that include Underscore.js, including transitive dependencies and bundled frontend assets.
- Prioritize internet-facing services, APIs, webhook handlers, message consumers, and file import pipelines that parse untrusted structured data.
- Upgrade Underscore.js to 1.13.8 or later and redeploy affected services.
- Add maximum nesting-depth, request-size, and payload-complexity validation for JSON and equivalent structured formats.
- Review use of _.flatten and _.isEqual; require finite flatten depth and avoid equality comparison of attacker-controlled deeply nested structures.
- Add or verify global exception handling so RangeError or stack overflow conditions do not crash long-running service processes.
- Monitor for repeated stack overflow errors, process restarts, elevated 5xx rates, and suspicious deeply nested request bodies.
- Because public exploit information is available, treat exposed vulnerable parsing paths as higher priority even though the current EPSS score is low and the issue is not listed in CISA KEV.
The record
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.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| npm | underscore | 0 | 1.13.8 |
| Chainguard | kubeflow-centraldashboard | 0 | 1.10.0-r13 |
| Chainguard | prism | 0 | 5.14.3-r9 |
| Chainguard | renovate | 0 | 43.55.6-r0 |
| Chainguard | vitess-22 | 0 | 22.0.4-r5 |
| Chainguard | vitess-23 | 0 | 23.0.3-r6 |
| Wolfi | kubeflow-centraldashboard | 0 | 1.10.0-r13 |
| Wolfi | prism | 0 | 5.14.3-r9 |
| Wolfi | renovate | 0 | 43.55.6-r0 |
| Wolfi | vitess-22 | 0 | 22.0.4-r5 |
| Wolfi | vitess-23 | 0 | 23.0.3-r6 |
| openSUSE:Tumbleweed | python-bqplot | 0 | 0.12.45-14.1 |
| openSUSE:Tumbleweed | python-ipympl | 0 | 0.9.7-17.1 |
| openSUSE:Tumbleweed | python-nbclassic | 0 | 1.3.3-1.1 |
Related vulnerabilities
- GHSA-qpx9-hpmf-5gmw Underscore has unlimited recursion in _.flatten and _.isEqual, potential for DoS attack Same vulnerability
- GHSA-f23m-r3pf-42rh lodash vulnerable to Prototype Pollution via array path bypass in `_.unset` and `_.omit` Also affects kubeflow-centraldashboard
- CVE-2026-2950 Impact: Lodash versions 4.17.23 and earlier are vulnerable to prototype pollution in the… Also affects kubeflow-centraldashboard
- CVE-2026-33896 Forge (also called `node-forge`) is a native implementation of Transport Layer Security… Also affects kubeflow-centraldashboard
- CVE-2026-33894 Forge (also called `node-forge`) is a native implementation of Transport Layer Security… Also affects kubeflow-centraldashboard
- CVE-2026-33891 Forge (also called `node-forge`) is a native implementation of Transport Layer Security… Also affects kubeflow-centraldashboard
- CVE-2026-33750 The brace-expansion library generates arbitrary strings containing a common prefix and… Also affects kubeflow-centraldashboard
- GHSA-2328-f5f3-gj25 Forge has a basicConstraints bypass in its certificate chain verification (RFC 5280… Also affects kubeflow-centraldashboard