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

> CVE-2026-4800: lodash vulnerable to Code Injection via `_.template` imports key names. CVSS 8.1 (CVSS 3.1), named in 1 status incident(s).

Canonical: https://rewindex.com/cve/CVE-2026-4800
Last updated: 2026-10-15T07:18:00Z

- Published: 2026-03-31 19:25 UTC · Updated: 2026-10-15 07:18 UTC · Assigner: openjs
- CVSS: 8.1 (CVSS 3.1) · Severity: High · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
- EPSS: 2.8%, 86th percentile (scored 2026-10-25)
- CISA KEV: no
- CWE: CWE-94

## 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.

## Affected vendors and products

- lodash: lodash
- lodash: lodash-amd
- lodash: lodash-es
- lodash: lodash.template
- Red Hat: Confidential Compute Attestation
- Red Hat: Cryostat 4
- Red Hat: Gatekeeper 3
- Red Hat: Logging Subsystem for Red Hat OpenShift
- Red Hat: Red Hat Advanced Cluster Management for Kubernetes 2
- Red Hat: Red Hat Advanced Cluster Security 4
- Red Hat: Red Hat Ansible Automation Platform 2
- Red Hat: Red Hat Ansible Automation Platform 2.5 for RHEL 8
- Red Hat: Red Hat Ansible Automation Platform 2.5 for RHEL 9
- Red Hat: Red Hat Ansible Automation Platform 2.6 for RHEL 9
- Red Hat: Red Hat build of Apache Camel - HawtIO 4
- Red Hat: Red Hat build of Apicurio Registry 3
- Red Hat: Red Hat Build of Keycloak
- Red Hat: Red Hat Connectivity Link 1
- Red Hat: Red Hat Data Grid 8.6.1
- Red Hat: Red Hat Directory Server 11
- Red Hat: Red Hat Directory Server 12
- Red Hat: Red Hat Directory Server 13
- Red Hat: Red Hat Discovery 2
- Red Hat: Red Hat Enterprise Linux 9
- Red Hat: Red Hat Enterprise Linux AI (RHEL AI) 3
- Red Hat: Red Hat Fuse 7
- Red Hat: Red Hat JBoss Enterprise Application Platform 7
- Red Hat: Red Hat JBoss Enterprise Application Platform 8
- Red Hat: Red Hat JBoss Enterprise Application Platform Expansion Pack
- Red Hat: Red Hat OpenShift Virtualization 4
- Red Hat: Red Hat Process Automation 7
- Red Hat: Self-service automation portal 2
- Red Hat: Streams for Apache Kafka 2.9.4
- Red Hat: Streams for Apache Kafka 3.2.0

## Tracked companies

- [Bitbucket](https://rewindex.com/company/bitbucket.md)
- [Confluence](https://rewindex.com/company/confluence.md)
- [Jira](https://rewindex.com/company/jira.md)

## Status incidents that name it

- 2026-04-03 15:32 UTC [Wiz: Some customers may see critical issues created from incorrectly classified vulnerability findings for CVE-2026-4800, CVE-2026-33937, CVE-2026-33938, and CVE-2026-33940](https://rewindex.com/company/wiz/incidents/p2c1vhj4cq2k.md) (names this CVE): “Some customers may see critical issues created from incorrectly classified vulnerability findings for CVE-2026-4800, CVE-2026-33937, CVE-2026-33938, and CVE-2026-33940 This incident has been resolved. This incident has been resolved.…”

## References

- [CVE record on cve.org](https://www.cve.org/CVERecord?id=CVE-2026-4800)
- [NVD entry](https://nvd.nist.gov/vuln/detail/CVE-2026-4800)
- [https://cna.openjsf.org/security-advisories.html](https://cna.openjsf.org/security-advisories.html)
- [https://github.com/lodash/lodash/security/advisories/GHSA-r5fr-rjxr-66jc](https://github.com/lodash/lodash/security/advisories/GHSA-r5fr-rjxr-66jc)

---

_Sources: CVE records from the CVE Program (cve.org). CVE® is a registered trademark of The MITRE Corporation. (https://www.cve.org/) This product uses data from the NVD API but is not endorsed or certified by the NVD. (https://nvd.nist.gov/) Known Exploited Vulnerabilities catalog from CISA. (https://www.cisa.gov/known-exploited-vulnerabilities-catalog) EPSS scores from FIRST (Exploit Prediction Scoring System). (https://www.first.org/epss/)_


---
Canonical: https://rewindex.com/cve/CVE-2026-4800 · Markdown: https://rewindex.com/cve/CVE-2026-4800.md · JSON: https://rewindex.com/api/v1/cves/CVE-2026-4800 · Data licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) · Generated 2026-10-26T02:06:43.521Z
