REDHAT-BUG-2453496: High severity npm/lodash vulnerability

Published Mar 31, 2026
·
Updated

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

1 affected component
npm/lodash<4.18.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade _.template to a version that resolves this vulnerability.

    Fixed in 4.18.0
  2. 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

Mar 31, 2026
Data Sourced
via Red Hat·08:01 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of REDHAT-BUG-2453496?

The severity of REDHAT-BUG-2453496 is classified as high with a score of 7.

2

How do I fix REDHAT-BUG-2453496?

To fix REDHAT-BUG-2453496, update lodash to the latest secure version that addresses the vulnerability.

3

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.

4

Which software is affected by REDHAT-BUG-2453496?

The vulnerability REDHAT-BUG-2453496 affects the lodash library used in npm packages.

5

When was REDHAT-BUG-2453496 published?

REDHAT-BUG-2453496 was published on March 31, 2026.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203