REDHAT-BUG-2453496: High severity npm/lodash vulnerability
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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
_.templateto a version that resolves this vulnerability.Fixed in 4.18.0 - Configuration
Do not pass untrusted input as key names in options.imports. Ensure only developer-controlled, static key names are used so polluted keys are not copied into imports and passed to the Function() constructor during template compilation.
_.template options.imports key names = developer-controlled, static key names only
Event History
Frequently Asked Questions
What is the severity of REDHAT-BUG-2453496?
The severity of REDHAT-BUG-2453496 is classified as high with a score of 7.
How do I fix REDHAT-BUG-2453496?
To fix REDHAT-BUG-2453496, update lodash to the latest secure version that addresses the vulnerability.
What impact does REDHAT-BUG-2453496 have?
REDHAT-BUG-2453496 allows an application to pass untrusted input, which could lead to code injection via the Function() constructor.
Which software is affected by REDHAT-BUG-2453496?
The vulnerability REDHAT-BUG-2453496 affects the lodash library used in npm packages.
When was REDHAT-BUG-2453496 published?
REDHAT-BUG-2453496 was published on March 31, 2026.