9.8

CVE-2021-23337: Command Injection

Modified
AliasesUBUNTU-CVE-2021-23337DEBIAN-CVE-2021-23337GHSA-35jh-r3h4-6jhm
Published 31-03-2026Last modified 15-10-2026

Vulnerability summary

CVE-2021-23337 is a critical (CVSS 9.8) Improper Control of Generation of Code vulnerability in lodash. EPSS estimates a 21.33% chance of exploitation in the next 30 days, higher than 97.6% of scored vulnerabilities. 6 public exploits are recorded.

Priority
Prioritisepublic exploit

Public exploit (reference, Date unknown)

Source freshness unavailable

How is this decided?
CVSS score
9.8/10
010
Critical · v3.1 (NVD)
EPSS score
21.33%
0%100%
High · 0.00 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits6reference

Advisory lineage

Upstream 3 · Downstream 3 · Related 2

Timeline

  1. 31-03-2026
    PublishedVulnerability first disclosed.
  2. 15-10-2026
    Last modifiedVulnerability information updated.

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 metrics

8 scores · 8 sources · 1 version

EPSS trend

Probability

21.33%

Chance of exploitation in the next 30 days

Percentile

98%

Versus all other CVEs

30-day change

No change 0.00 pp

From 21.33% on 04-10-2026

04-10-202603-11-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

6 found
  • referenceUnverified

    Exploit Reference (snyk.io)

    Maturity: unknown

  • referenceUnverified

    Exploit Reference (snyk.io)

    Maturity: unknown

  • referenceUnverified

    Exploit Reference (snyk.io)

    Maturity: unknown

Show all 6 exploits
  • referenceUnverified

    Exploit Reference (snyk.io)

    Maturity: unknown

  • referenceUnverified

    Exploit Reference (snyk.io)

    Maturity: unknown

  • referenceUnverified

    Exploit Reference (snyk.io)

    Maturity: unknown

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.

Chainguard148 products
  • airflow-2All versions (No fix recorded)
  • airflow-core-2All versions (No fix recorded)
  • arangodb-3.11< 3.11.14.3-r5
  • arangodb-3.12< 3.12.7.2-r5
  • argo-workflows-ui-3.6< 3.6.19-r5
Wolfi36 products
  • argo-workflows-ui-3.7< 3.7.13-r0
  • argo-workflows-ui-4.0< 4.0.4-r0
  • code-server< 4.112.0-r2
  • jitsucom-jitsu-console< 2.11.0-r19
  • json-server< 0.17.4-r6
Npm5 products
  • lodash≥ 4.0.0, < 4.18.0 | < 4.17.21
  • lodash-amd≥ 4.0.0, < 4.18.0
  • lodash-es≥ 4.0.0, < 4.18.0 | < 4.17.21
  • lodash-template≤ 1.0.0
  • lodash.template≥ 4.0.0, < 4.18.0 | ≤ 4.5.0
Lodash4 products
  • lodash< 4.17.21 | ≥ 4.0.0, < 4.18.1 | ≥ 4.0.0, < 4.18.0
  • lodash-amd≥ 4.0.0, < 4.18.1 | ≥ 4.0.0, < 4.18.0
  • lodash-es≥ 4.0.0, < 4.18.1 | ≥ 4.0.0, < 4.18.0
  • lodash.template≥ 4.0.0, < 4.18.1 | ≥ 4.0.0, < 4.18.0
Netapp3 products
Debian1 product
  • node-lodash< 4.17.21+dfsg+~cs8.31.173-1 | < 4.17.21+dfsg+~cs8.31.198.20210220-9+deb12u1 | < 4.17.21+dfsg+~cs8.31.198.20210220-9+deb13u1 | < 4.18.1+dfsg-1
Oracle1 product
RubyGems1 product
  • lodash-rails< 4.17.21
Ubuntu1 product
  • node-lodash< 2.4.1+dfsg-3ubuntu0.1~esm1 | < 4.17.4+dfsg-1ubuntu0.1~esm1 | < 4.17.15+dfsg-2ubuntu0.1~esm1 | < 4.17.21+dfsg+~cs8.31.198.20210220-5ubuntu0.1~esm1 | < 4.17.21+dfsg+~cs8.31.198.20210220-9ubuntu0.24.04.1~esm1 | < 4.17.21+dfsg+~cs8.31.198.20210220-9ubuntu0.25.10.1 | All versions (No fix recorded) | < 4.17.23+dfsg-1ubuntu0.1~esm1

9 vendors · 200 products · Showing 200 of 231

References

129 links
Show all 100 references

Showing 100 of 129.