CVE-2026-4800: Code Injection in Lodash _.template Import Key Names
- Vendor
- Lodash
CVE-2026-4800 is a code-injection vulnerability in Lodash _.template caused by insufficient validation of options.imports key names before they reach the Function() constructor. The fix for CVE-2021-23337 validated the variable option but omitted equivalent validation for import keys. Attacker-controlled keys can inject default-parameter expressions that execute arbitrary code during template compilation. Additionally, imports are merged using assignInWith, which enumerates inherited properties through for..in; malicious keys introduced into Object.prototype through a separate prototype-pollution vulnerability can therefore reach the same execution sink. The issue affects lodash, lodash-es, lodash-amd, and lodash.template and is fixed in version 4.18.1.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation permits arbitrary JavaScript execution in the affected application's execution context. In server-side deployments, this can result in remote code execution with the application's privileges, potentially exposing sensitive data, permitting unauthorized data modification, and disrupting service. Actual reachability and severity depend on how the application constructs template imports and the privileges and capabilities available to its JavaScript runtime.
Mitigation
If you can’t patch tonight, do this now.
Do not pass untrusted input as key names in options.imports; use only developer-controlled, static key names. Also address separate prototype-pollution weaknesses that could introduce malicious inherited keys, because restricting explicitly supplied import keys alone does not eliminate the inherited-property attack path.
Remediation
Patch, then assume compromise.
Upgrade affected lodash, lodash-es, lodash-amd, and lodash.template dependencies to version 4.18.1 or a later fixed release. For products bundling these dependencies, install the applicable vendor security update and ensure that deployed application bundles incorporate the corrected dependency.
Exploits
1 exploit validated by Mallory's analysis. Hidden: 1 rejected by Mallory's analysis as not a working exploit.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
References
Frequently asked questions
- Is CVE-2026-4800 exploited in the wild?
- As of Nov 27, 2026, Mallory has no reports of CVE-2026-4800 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2026-4800?
- Yes. Mallory tracks 1 public exploit or proof of concept for CVE-2026-4800, the earliest disclosed Apr 1, 2026.
- Is there a patch for CVE-2026-4800?
- Upgrade affected lodash, lodash-es, lodash-amd, and lodash.template dependencies to version 4.18.1 or a later fixed release. For products bundling these dependencies, install the applicable vendor security update and ensure that deployed application bundles incorporate the corrected dependency.
- What products are affected by CVE-2026-4800?
- Lodash, Lodash-Amd, Lodash-Es, Lodash.Template, and Lodash-Rails.
- How severe is CVE-2026-4800?
- CVE-2026-4800 has a CVSS v3.1 score of 9.8 (Critical) and an EPSS score of 3.1% (88th percentile) as of Nov 27, 2026.
Recent activity
89 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.