rewindex

RewindexCVEs

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

High · CVSS 8.1 (CVSS 3.1)EPSS 2.8%, 86th percentilePublished Updated Assigner: openjs

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.

Vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H · CWE-94

Tracked companies

BitbucketConfluenceJira

Mapped from the CVE’s affected-product data, NVD CPE matches, vendor advisories or package feeds. A mapping means the vendor’s software is named, not that its hosted service was exposed.

Status incidents that name it

Affected vendors and products

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

References

All CVEsMarkdownJSON