CVE-2026-4800
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.
Weakness
- CWE-94: Improper Control of Generation of Code
CISA SSVC decision points
| Exploitation | none |
|---|---|
| Automatable | no |
| Technical impact | total |
| Scored | 2026-03-31 |
Timeline
- 2026-03-31Published by the CNA19:25 UTC
- 2026-03-31CISA SSVC decision recordedsame day
- 2026-04-01GitHub advisory published (GHSA-r5fr-rjxr-66jc)1 day after publication
Exploit and advisory records
GitHub advisory GHSA-r5fr-rjxr-66jc, affected packages:
| Package | Vulnerable versions | Fixed in |
|---|---|---|
| npm lodash | from 4.0.0 before 4.18.0 | 4.18.0 |
| npm lodash-amd | from 4.0.0 before 4.18.0 | 4.18.0 |
| npm lodash-es | from 4.0.0 before 4.18.0 | 4.18.0 |
| npm lodash.template | from 4.0.0 before 4.18.0 | 4.18.0 |
Affected products
Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| lodash lodash | from 4.0.0 before 4.18.0fixed in 4.18.0 | 4.18.0 |
| lodash lodash-amd | from 4.0.0 before 4.18.0fixed in 4.18.0 | 4.18.0 |
| lodash lodash-es | from 4.0.0 before 4.18.0fixed in 4.18.0 | 4.18.0 |
| lodash lodash.template | from 4.0.0 before 4.18.0fixed in 4.18.0 | 4.18.0 |
References
- https://access.redhat.com/errata/RHBA-2026:21387
- https://access.redhat.com/errata/RHSA-2026:10131
- https://access.redhat.com/errata/RHSA-2026:10175
- https://access.redhat.com/errata/RHSA-2026:10710
- https://access.redhat.com/errata/RHSA-2026:10713
- https://access.redhat.com/errata/RHSA-2026:11454
- https://access.redhat.com/errata/RHSA-2026:11469
- https://access.redhat.com/errata/RHSA-2026:11470
- https://access.redhat.com/errata/RHSA-2026:11471
- https://access.redhat.com/errata/RHSA-2026:11493
- https://access.redhat.com/errata/RHSA-2026:11494
- https://access.redhat.com/errata/RHSA-2026:11495
- https://access.redhat.com/errata/RHSA-2026:11516
- https://access.redhat.com/errata/RHSA-2026:12277
- https://access.redhat.com/errata/RHSA-2026:12279
- https://access.redhat.com/errata/RHSA-2026:13545
- https://access.redhat.com/errata/RHSA-2026:13553
- https://access.redhat.com/errata/RHSA-2026:13571
- https://access.redhat.com/errata/RHSA-2026:13826
- https://access.redhat.com/errata/RHSA-2026:14870
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2026-4800'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2026-4800'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2026-4800'curl 'https://api.contrastcyber.com/cve_products/CVE-2026-4800'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).