Patchfirst
CVE-2021-23337 Public exploit High · 7.2 EPSS 20.2%

Command Injection

Fix:upgrade the 3 affected packages Versions ↓

Summary

The flaw is a command injection vulnerability in the template function of Lodash, affecting versions prior to 4.17.21. An attacker with network access and high-level privileges (the vector indicates a privileges-required condition, with no user interaction needed) can inject commands through the template function to compromise the confidentiality, integrity and availability of the affected system.

Official description · CVE.org

Lodash versions prior to 4.17.21 are vulnerable to Command Injection via the template function.

Breakdown
74.5 / 100
Exploited
Yes, in VulnCheck KEV
Reports
0
Tactics
0/15

First seen exploited 6 years after disclosure. Public exploit code (PoC-in-GitHub) appeared 5 years after disclosure.

  1. Disclosedday 0
  2. Public exploit codePoC-in-GitHub+5 yrs
  3. First seen exploitedVulnCheck KEV evidence+6 yrs

2 related vulnerabilities in the same code over 5 years. The latest fix listed for lodash is 4.18.1.

Linked vulnerabilitiesLinked by evidence that a fix failed or the same code was patched again. Oldest first.

  1. This CVECVE-2021-23337Command Injection15 Feb 2021
  2. relatedHigh

    Why these are linked:

    CVE-2026-4800lodash vulnerable to Code Injection via `_.template` imports key…31 Mar 2026

Fixes in lodashnpm package, by fixed version. Earlier and later fixes in the same package, not necessarily the same bug.

  1. 4.17.12CVE-2019-1074425 Jul 2019
  2. 4.17.19CVE-2020-820315 Jul 2020
  3. 4.17.21CVE-2020-2850015 Feb 2021
  4. 4.17.21CVE-2021-2333715 Feb 2021
  5. 4.17.23CVE-2025-1346521 Jan 2026
  6. 4.18.0CVE-2026-480031 Mar 2026
  7. 4.18.1CVE-2026-295031 Mar 2026Latest listed

Affected versions and fixes

as published in the CVE record

Lodash

Affected: prior to 4.17.21

Am I affected? What do I upgrade to?

From GitHub Security Advisories and OSV

5 packages in 2 ecosystems. No single main package: each of these ships the affected code.

  • npmlodash
    Affected: All versions before 4.17.21Upgrade to 4.17.21 or later
  • npmlodash-es
    Affected: All versions before 4.17.21Upgrade to 4.17.21 or later
  • RubyGemslodash-rails
    Affected: All versions before 4.17.21Upgrade to 4.17.21 or later
  • npmlodash.template
    Affected: 4.5.0 and earlierNo fixed version published
  • npmlodash-template
    Affected: 1.0.0 and earlierNo fixed version published

Check your lockfile against all CVEs

References

13 links, grouped by NVD tag
↑ ↓ chooseEnter openEsc close