Back to CVE records
High 8.1Published Mar 31, 2026

CVE-2026-4800lodash vulnerable to Code Injection via `_.template` imports key names

Updated under an hour ago ()

Does this affect you?

It affects lodash and 58 other products. Add what you run to find out whether that includes you.

No exploitation reported and no EPSS estimate yet.

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
8.1 HIGH (v3.1, CNA)CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness (CWE)
CWE-94
Known exploited
Not in CISA's KEV catalog
EPSS (exploitation in the next 30 days)
Not loaded for this CVE
Assigned by
openjs
NVD analysis
Modified
Record last updated
Oct 15, 2026
First seen by InfoSec Signals
Oct 9, 2026

Affected products

Affected products
lodash lodash
lodash:lodash (from the name)
from 4.0.0 before 4.18.1; 4.18.1 not affected
CNA record
lodash lodash-es
lodash:es (from the name)
from 4.0.0 before 4.18.1; 4.18.1 not affected
CNA record
lodash lodash-amd
lodash:amd (from the name)
from 4.0.0 before 4.18.1; 4.18.1 not affected
CNA record
lodash lodash.template
lodash:lodash.template (from the name)
from 4.0.0 before 4.18.1; 4.18.1 not affected
CNA record
from 4.2.0-9 not affected
CISA ADP
from 0:2.5.20260715-1.el8ap not affected
CISA ADP
Red Hat Red Hat Data Grid 8.6.1
redhat:jboss_data_grid
8
CISA ADP
from 0:0.12.1-1.el10_1.3 not affected; from 0:0.12.2-3.el10_2.1 not affected
CISA ADP
from 0:0.12.0-3.el10_0.5 not affected
CISA ADP
from 0:0.10.8-1.el8_4.11 not affected
CISA ADP

References

References

The CVE record is authoritative. Products marked “from the name” were identified from the CNA's free-text names, not a CPE, and are matched less certainly. This product uses the NVD API but is not endorsed or certified by the NVD.

Your cookie choices
We use essential cookies to run this site, and, only with your consent, an advertising cookie from Google to measure whether our ads lead to sign-ups and subscriptions. See our for details.