Underscore has unlimited recursion in _.flatten and _.isEqual, potential for DoS attack
CVE-2026-27601 · GHSA-qpx9-hpmf-5gmw
- Affected
- npm underscore <= 1.13.7
- Fixed in
- 1.13.8· Vendor fix available
- Issue
- Impact In simple words, some programs that use .flatten or .isEqual could be made to crash. Someone who wants to do harm may be able to do this on purpose. This can only be done if the program has special properties. It only works in Underscore versions up to 1.13.7. A more detailed explanation follows. In affected versions of Underscore, 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. A proof of concept (PoC) for this type of attack with .isEqual: A proof of concept (PoC) for this type of attack with .flatten: An application that crashes because of this can be restarted, so the bug is most relevant to applications for which continued operation is important, such as server applications. Furthermore, an application is only vulnerable to this type of attack if ALL of the following conditions are met: - Untrusted…
Recommended action: Upgrade to 1.13.8 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.