{"cve":"CVE-2026-4800","nvd":{"published":"2026-03-31T20:16:29.660","modified":"2026-10-15T07:18:00.610","status":"Modified","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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8},"cwes":["CWE-94"],"references":["https://cna.openjsf.org/security-advisories.html","https://github.com/lodash/lodash/security/advisories/GHSA-r5fr-rjxr-66jc","https://access.redhat.com/errata/RHBA-2026:21387","https://access.redhat.com/errata/RHSA-2026:10131","https://access.redhat.com/errata/RHSA-2026:10175"],"products":["lodash:lodash","lodash:lodash-amd","lodash:lodash-es","lodash:lodash.template"],"source":"nvd","synced_at":"2026-10-19T22:28:18.033120106+00:00"},"epss":{"cve":"CVE-2026-4800","score":0.02759,"percentile":0.86161,"date":"2026-10-25"},"kev":null,"osv":[{"id":"GHSA-r5fr-rjxr-66jc","url":"https://osv.dev/vulnerability/GHSA-r5fr-rjxr-66jc","summary":"lodash vulnerable to Code Injection via `_.template` imports key names","modified":"2026-10-17T02:56:15.633068434Z","packages":[{"ecosystem":"npm","name":"lodash","purl":"pkg:npm/lodash","ranges":[">=4.0.0 <4.18.0"],"fixed":["4.18.0"]},{"ecosystem":"npm","name":"lodash-es","purl":"pkg:npm/lodash-es","ranges":[">=4.0.0 <4.18.0"],"fixed":["4.18.0"]},{"ecosystem":"npm","name":"lodash-amd","purl":"pkg:npm/lodash-amd","ranges":[">=4.0.0 <4.18.0"],"fixed":["4.18.0"]},{"ecosystem":"npm","name":"lodash.template","purl":"pkg:npm/lodash.template","ranges":[">=4.0.0 <4.18.0"],"fixed":["4.18.0"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}