Problem/Motivation
Drupal core currently includes Underscore.js 1.13.7, which is affected by CVE-2026-27601.
In versions prior to 1.13.8, the functions .flatten and .isEqual use recursion without a depth limit. Under specific conditions, this can lead to a stack overflow and be exploited as a Denial of Service (DoS).
The vulnerability is classified as:
CWE-770: Allocation of Resources Without Limits or Throttling
CVSS v4 Base Score: 8.2 (HIGH)
CVSS v3.1 Base Score: 7.5 (HIGH)
The issue is fixed in Underscore.js 1.13.8.
References:
https://github.com/jashkenas/underscore/security/advisories/GHSA-qpx9-hp...
https://underscorejs.org/#1.13.8
Create a deeply nested recursive data structure from untrusted input (e.g., via JSON.parse without depth validation).
Pass the structure to .flatten without specifying a finite depth limit,
or compare two attacker-controlled structures using .isEqual.
Trigger a stack overflow leading to a Denial of Service condition.
Update the bundled Underscore.js library in Drupal core from 1.13.7 to 1.13.8, which includes the upstream fix.
Update the Underscore.js library to version 1.13.8.
Verify no regressions in core JavaScript behaviors.
Confirm library metadata and license headers remain accurate.
Run automated tests.
Proposed resolution
Updated Underscore.js from 1.13.7 to 1.13.8 to address CVE-2026-27601 (Denial of Service vulnerability related to uncontrolled recursion in .flatten and .isEqual).
| Comment | File | Size | Author |
|---|
Issue fork drupal-3578028
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
cilefen commentedComment #4
longwaveMR is the result of:
Comment #6
smustgrave commentedLGTM, since it’s a patch release don’t see anything that broke
Comment #7
quietone commentedComment #12
catchCommitted/pushed to main, 11.x, and 11.3.x, thanks!
Comment #15
xjmReopening this to explore the possibility of backport. We could use at least a 10.6 MR, and we can discuss whether to backport it to 11.2 and 10.5.
Comment #18
xjmAccording to the backport policy, the issue should be committed to 10.6.x first. Additionally, we haven't determined yet whether this is safe to backport to the patch release versions (11.2.x and 10.5.x).
It looks like the needed changes to the lockfile and
package.jsonare missing from the new MR?Comment #19
quietone commentedThis would be a good task to work on for Contribution day tomorrow.
Comment #20
xjmComment #23
georgebc commentedOpened MR for the 10.6.x backport. Ran cd core && yarn add -D underscore && yarn vendor-update. Includes the lockfile and package.json changes.
Comment #25
quietone commentedAs soon as I made that comment I looked at the previous commits and see that this was changed to the carat type constraint string.
However, this is for Drupal 10, should this stay with the tilde version so underscore.js stays on the current minor?
Comment #26
xjmI think we don't want to change the constraint type; those are chosen on purpose.
Comment #27
xjmComment #28
xjmI used the following steps (within the core directory) based on the core dependency update instructions:
(And confirmed that underscore was listed.)
Two options: We usually increase the required minimum patch version if the the vulnerability is exploitable in core and leave it alone if not, at least for backport versions.
When increasing the constraint:
core/package.jsonand manually increase the constraint to~1.13.8.yarn installWhen not increasing the constraint:
(A no-op in the case of this issue; it does not affect the built libraries.)
(No issues.) :)
Fortunately, the only differences between the provided MR and the strategy where we increase the constraint is only the carat versus the tilde in the
package.jsonand lockfile:If we choose not to increase the constraint it's similarly simple:
Comment #29
quietone commentedI updated the 10.6.x MR per the last comments by xjm.
What I did
The only changes were to package.json and yarn.lock