CVE-2026-4800

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.

Severity
HIGH
CVSS v3
8.1
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H · source cna
Exploit chance (EPSS)
2.870%
chance of exploitation in the next 30 days
higher than 87% of scored CVEs · 2026-11-17
CISA KEV
Not listed
Public exploit code
None public
Exploit references (NVD and CNA): 0
Metasploit modules: 0
Nuclei templates: 0

Weakness

CISA SSVC decision points

Exploitationnone
Automatableno
Technical impacttotal
Scored2026-03-31

Timeline

  1. 2026-03-31Published by the CNA19:25 UTC
  2. 2026-03-31CISA SSVC decision recordedsame day
  3. 2026-04-01GitHub advisory published (GHSA-r5fr-rjxr-66jc)1 day after publication

The timeline shows what already happened. To be told when this CVE changes next, watch it from the API.

Exploit and advisory records

GitHub advisory GHSA-r5fr-rjxr-66jc, affected packages:

PackageVulnerable versionsFixed in
npm lodashfrom 4.0.0 before 4.18.04.18.0
npm lodash-amdfrom 4.0.0 before 4.18.04.18.0
npm lodash-esfrom 4.0.0 before 4.18.04.18.0
npm lodash.templatefrom 4.0.0 before 4.18.04.18.0

Affected products

Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.

ProductVulnerable versionsFixed in
lodash lodashfrom 4.0.0 before 4.18.0fixed in 4.18.04.18.0
lodash lodash-amdfrom 4.0.0 before 4.18.0fixed in 4.18.04.18.0
lodash lodash-esfrom 4.0.0 before 4.18.0fixed in 4.18.04.18.0
lodash lodash.templatefrom 4.0.0 before 4.18.0fixed in 4.18.04.18.0

Products and versions as NVD and the vendor that published the CVE list them.

References

80 references in total; the first 20 are shown.

Get more CVE data from the API.

Free without a key or signup. Pro adds monitoring and higher limits: pricing.

Sources