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.
References
Configurations
Configuration 1 (hide)
|
History
15 Oct 2026, 07:18
| Type | Values Removed | Values Added |
|---|---|---|
| Summary | (en) 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. | |
| References |
|
|
04 Sep 2026, 13:19
| Type | Values Removed | Values Added |
|---|---|---|
| References |
|
03 Sep 2026, 13:05
| Type | Values Removed | Values Added |
|---|---|---|
| References |
|
27 Aug 2026, 13:18
| Type | Values Removed | Values Added |
|---|---|---|
| References |
|
26 Aug 2026, 13:19
| Type | Values Removed | Values Added |
|---|---|---|
| References |
|
21 Aug 2026, 13:18
| Type | Values Removed | Values Added |
|---|---|---|
| References |
|
18 Aug 2026, 12:19
| Type | Values Removed | Values Added |
|---|---|---|
| References |
|
06 Aug 2026, 13:18
| Type | Values Removed | Values Added |
|---|---|---|
| References |
|
30 Jul 2026, 12:18
| Type | Values Removed | Values Added |
|---|---|---|
| References |
|
24 Jul 2026, 20:10
| Type | Values Removed | Values Added |
|---|---|---|
| Summary |
|
21 Jul 2026, 12:18
| Type | Values Removed | Values Added |
|---|---|---|
| References |
|
17 Jul 2026, 13:18
| Type | Values Removed | Values Added |
|---|---|---|
| References |
|
16 Jul 2026, 12:18
| Type | Values Removed | Values Added |
|---|---|---|
| References |
|
14 Jul 2026, 12:17
| Type | Values Removed | Values Added |
|---|---|---|
| References |
|
10 Jul 2026, 12:17
| Type | Values Removed | Values Added |
|---|---|---|
| References |
|
09 Jul 2026, 13:17
| Type | Values Removed | Values Added |
|---|---|---|
| References |
|
03 Jul 2026, 13:17
| Type | Values Removed | Values Added |
|---|---|---|
| References |
|
02 Jul 2026, 12:17
| Type | Values Removed | Values Added |
|---|---|---|
| References |
|
01 Jul 2026, 13:17
| Type | Values Removed | Values Added |
|---|---|---|
| References |
|
30 Jun 2026, 03:20
| Type | Values Removed | Values Added |
|---|---|---|
| References |
|
01 May 2026, 18:09
| Type | Values Removed | Values Added |
|---|---|---|
| References | () https://github.com/advisories/GHSA-35jh-r3h4-6jhm - Not Applicable | |
| References | () https://github.com/lodash/lodash/commit/3469357cff396a26c363f8c1b5a91dde28ba4b1c - Not Applicable | |
| First Time |
Lodash lodash-amd
|
|
| CPE | cpe:2.3:a:lodash:lodash-amd:*:*:*:*:*:node.js:*:* |
07 Apr 2026, 15:43
| Type | Values Removed | Values Added |
|---|---|---|
| CPE | cpe:2.3:a:lodash:lodash-rails:*:*:*:*:*:ruby:*:* cpe:2.3:a:lodash:lodash:*:*:*:*:*:node.js:*:* cpe:2.3:a:lodash:lodash-es:*:*:*:*:*:node.js:*:* cpe:2.3:a:lodash:lodash.template:*:*:*:*:*:node.js:*:* |
|
| References | () https://cna.openjsf.org/security-advisories.html - Third Party Advisory | |
| References | () https://github.com/advisories/GHSA-35jh-r3h4-6jhm - Third Party Advisory | |
| References | () https://github.com/lodash/lodash/commit/3469357cff396a26c363f8c1b5a91dde28ba4b1c - Patch | |
| First Time |
Lodash
Lodash lodash.template Lodash lodash Lodash lodash-rails Lodash lodash-es |
31 Mar 2026, 20:16
| Type | Values Removed | Values Added |
|---|---|---|
| New CVE |
Information
Published : 2026-03-31 20:16
Updated : 2026-10-15 07:18
NVD link : CVE-2026-4800
Mitre link : CVE-2026-4800
CVE.ORG link : CVE-2026-4800
JSON object : View
Products Affected
lodash
- lodash.template
- lodash
- lodash-es
- lodash-amd
CWE
CWE-94
Improper Control of Generation of Code ('Code Injection')
