LiveActive security incident?Get immediate response
CVE Record

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

Impact: The fix for CVE-2021-23337 (https://github.com/advisories/GHSA-35jh-r3h4-6jhm) added validation for the variable option in _.template but did not apply the same validation to options.imports key names. 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. If Object.prototype has been polluted by any other vector, the polluted keys are copied into the imports object and passed to Function(). Patches: Users should upgrade to version 4.18.0. Workarounds: Do not pass untrusted input as key names in options.imports. Only use developer-controlled, static key names.

HighCVSS 8.1Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

CVE-2026-4800 is a high-severity lodash code-injection issue in template compilation. It matters when an application lets untrusted data control import key names for _.template, or when prototype pollution supplies inherited keys. Successful exploitation could run arbitrary code during template compilation.

Executive priority

Prioritize remediation for internet-facing or multi-tenant applications that compile lodash templates. The issue can become severe where template imports are user-influenced, but organizations should validate actual data flow before treating every lodash dependency as directly exploitable.

Technical view

The prior fix for CVE-2021-23337 validated the _.template variable option but not options.imports key names. Those keys reach the same Function() constructor sink. lodash also merges imports with assignInWith, so polluted inherited Object.prototype keys may be copied into imports and compiled.

Likely exposure

Most exposed systems are JavaScript applications using lodash, lodash-es, lodash-amd, or lodash.template 4.x with _.template and dynamic imports key names. Exposure is narrower if imports names are developer-controlled and prototype pollution is absent.

Exploitation context

The source bundle reports CVSS 8.1 with high attack complexity. KEV is false, and no provided source cites active exploitation. The attack requires a vulnerable application data flow into _.template imports keys, or separate prototype pollution reaching compilation.

Researcher notes

Focus validation on the Function() constructor path reached from _.template and imports key names. The bundle describes inherited-property copying through assignInWith, making prototype pollution an important companion condition. Avoid assuming exploitability from package presence alone.

Mitigation direction

  • Upgrade affected lodash packages to version 4.18.0.
  • Keep options.imports key names static and developer-controlled.
  • Do not pass user input into _.template import identifiers.
  • Review and remediate prototype pollution paths in the application.
  • Apply relevant vendor advisories, including Red Hat errata where applicable.

Validation and detection

  • Inventory lodash, lodash-es, lodash-amd, and lodash.template versions.
  • Search code for _.template usage with options.imports.
  • Confirm imports key names cannot come from requests, configs, or stored user data.
  • Check dependency lockfiles and bundled frontend assets.
  • Review prototype pollution findings that could affect Object.prototype before template compilation.
Prepared
Confidence
medium
Sources
12

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · medium confidence lookup

CWE-94: Code execution behavior lookup

Code execution and unsafe deserialization weaknesses often justify reviewing execution behavior and process telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
description · low confidence lookup

Execution behavior lookup

The CVE wording references code or command execution, so execution technique review may help defensive triage. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2026-4800 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
8.1 (3.1)
Known Exploited
No
Published

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

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

2CVSS vectors
5Timeline events
2ADP providers
44Source links

SSVC decision data

CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: total

CVSS vector scores

2 official scores

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
8.1CVSS 3.1HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H2.25.9openjs
8.1CVSS 3.1HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H2.25.9redhat-SADP

Vulnerability scoring details

Base CVSS 3.1 score

8.1High
CVSS 3.1 vector shape for CVE-2026-4800Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

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

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. ADP timelineredhat-SADP

    Made public.

  3. CVE publishedCVE Program

    The CVE record was published.

  4. ADP timelineredhat-SADP

    Reported to Red Hat.

  5. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

ADP provider summaries

CISA-ADPCISA ADP Vulnrichment
other:ssvc
redhat-SADPlodash: lodash: Arbitrary code execution via untrusted input in template imports
other:Red Hat severity ratingcvssV3_1
  • 2026-03-31T20:01:21.918Z: Reported to Red Hat.
  • 2026-03-31T19:25:55.987Z: Made public.

Source materials

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
lodashlodash4.0.0, 4.18.0unaffected
lodashlodash-es4.0.0, 4.18.0unaffected
lodashlodash-amd4.0.0, 4.18.0unaffected
lodashlodash.template4.0.0, 4.18.0unaffected
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.