Live threats

All CVEs / Lodash

CVE-2026-4800Lodash

Critical 9.8 No auth needed

Priority
74
CVSS 3.1
9.8
EPSS
—
Auth required
No
Published
Mar 31, 2026
Updated
Oct 15, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-94
SSVC (CISA)
Exploitation: none · Automatable: no · Technical impact: total
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Lodash.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
npm lodash ≥ 4.0.0 < 4.18.0 4.18.0 npm install lodash@4.18.0
npm lodash-amd ≥ 4.0.0 < 4.18.0 4.18.0 npm install lodash-amd@4.18.0
npm lodash-es ≥ 4.0.0 < 4.18.0 4.18.0 npm install lodash-es@4.18.0
npm lodash.template ≥ 4.0.0 < 4.18.0 4.18.0 npm install lodash.template@4.18.0

Per OSV / GitHub Advisories (GHSA-r5fr-rjxr-66jc). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
lodashlodash≥ 4.0.0 < 4.18.0
lodashlodash-amd≥ 4.0.0 < 4.18.0
lodashlodash-es≥ 4.0.0 < 4.18.0
lodashlodash.template≥ 4.0.0 < 4.18.0

Official advisories

Also: Red Hat (+20)

Vendor, CERT and distribution advisories that name this CVE. Original titles.

Official sources

References

Links published by the sources. Open them with care.