Critical severity · published Mar 31, 2026
CVE-2026-4800
lodash vulnerable to Code Injection via `_.template` imports key names
9.8
CVSS
2.8%
EPSS
No
On KEV
Description
The fix for CVE-2021-23337 added validation for the variable option in _.template but did not apply the same validation to options.imports key names, and both paths flow into the same Function() constructor sink. When an application passes untrusted input as options.imports key names, an attacker can inject default-parameter expressions that execute arbitrary code at template compilation time. Additionally, _.template uses assignInWith to merge imports, which enumerates inherited properties via for..in, so if Object.prototype has been polluted by another vector the polluted keys are copied into the imports object and passed to Function(). The issue is fixed in 4.18.1 for lodash, lodash-es, lodash-amd, and lodash.template. As a workaround, do not pass untrusted input as key names in options.imports; use only developer-controlled, static key names.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Confidentiality
High
Integrity
High
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)2.8% · higher than 86% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
LO
lodash · lodash
4.0.0 before 4.18.1 · source: vendor, NVD
LO
lodash-amd · lodash
4.0.0 before 4.18.1 · source: vendor, NVD
LO
lodash-es · lodash
4.0.0 before 4.18.1 · source: vendor, NVD
LO
lodash.template · lodash
4.0.0 before 4.18.1 · source: vendor, NVD
CO
Cluster Observability Operator 1.5.0 · Red Hat
All versions, or not specified · source: CISA
CC
Confidential Compute Attestation · Red Hat
All versions, or not specified · source: CISA
C4
Cryostat 4 · Red Hat
All versions, or not specified · source: CISA
C4
Cryostat 4 on RHEL 9 · Red Hat
All versions, or not specified · source: CISA
LS
Logging Subsystem for Red Hat OpenShift · Red Hat
All versions, or not specified · source: CISA
MT
Migration Toolkit for Virtualization 2.1 · Red Hat
All versions, or not specified · source: CISA
MT
Migration Toolkit for Virtualization 2.9 · Red Hat
All versions, or not specified · source: CISA
NO
Network Observability (NETOBSERV) 1.11.0 · Red Hat
All versions, or not specified · source: CISA
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2026-4800
CVE.org
https://www.cve.org/CVERecord?id=CVE-2026-4800
Third Party Advisory
https://cna.openjsf.org/security-advisories.html
github.com
https://github.com/lodash/lodash/security/advisories/GHSA-r5fr-rjxr-66jc
access.redhat.com
https://access.redhat.com/errata/RHBA-2026:21387
access.redhat.com
https://access.redhat.com/errata/RHSA-2026:10131
access.redhat.com
https://access.redhat.com/errata/RHSA-2026:10175
access.redhat.com
https://access.redhat.com/errata/RHSA-2026:10710
More from lodash
9.1
CVE-2019-10744
Versions of lodash lower than 4.17.12 are vulnerable to Prototype Pollution
7.4
CVE-2020-8203
Prototype pollution attack when using _.zipObjectDeep in lodash before 4.17.20
7.2
CVE-2021-23337
Command Injection
6.5
CVE-2019-1010266
lodash prior to 4.17.11 is affected by: CWE-400: Uncontrolled Resource Consumption
6.5
CVE-2018-3721
lodash node module before 4.17.5 suffers from a Modification of Assumed-Immutable Data (MAID) vulnerability via defaultsDeep, merge, and mergeWith functions, which allows a…
