CVE-2021-23337 is a high-severity (CVSS 7.2) Code Injection vulnerability in lodash. 6 public exploit references exist, so weaponization risk is real. A fix is available for lodash — see the affected versions and patch details below.
Command Injection in lodash
Exploitation Status
No confirmed exploitation observed yet
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- A successful exploit gives an attacker total control of the affected component, not partial access.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2021-23337.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2021-23337 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 394,415 CVEs with a current EPSS score, this one falls in the 10–50% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
lodashnpmlodash-esnpmlodash.templatenpmDescription
Lodash versions prior to 4.17.21 are vulnerable to Command Injection via the template function.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | lodash | all versions | 4.17.21npm install lodash@4.17.21 |
| 📦npm | lodash-es | all versions | 4.17.21npm install lodash-es@4.17.21 |
| 📦npm | lodash.template | all versions | No fix |
| 📦npm | lodash-template | all versions | No fix |
| 💎RubyGems | lodash-rails | all versions | 4.17.21bundle update lodash-rails --conservative |
Affected Products
lodashlodashactive iq unified managernetappcloud managernetappsystem managernetappbanking corporate lending process managementoraclebanking credit facilities process managementoracleResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Lodash versions prior to 4.17.21 are vulnerable to Command Injection via…
Lodash versions prior to 4.17.21 are vulnerable to Command Injection via…
Lodash versions prior to 4.17.21 are vulnerable to Command Injection via…
Lodash versions prior to 4.17.21 are vulnerable to Command Injection via…
Lodash versions prior to 4.17.21 are vulnerable to Command Injection via…
Lodash versions prior to 4.17.21 are vulnerable to Command Injection via…
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for lodash, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update lodash to 4.17.21 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-23337 is resolved across your whole dependency graph.
Workarounds
Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.
How to detect CVE-2021-23337
A community-maintained Nuclei template exists for this CVE. You can scan for it directly:
nuclei -id cve-2021-23337 -u https://target- Template
- Lodash Template - Server-Side Template Injection (RCE)
- Severity
- high
- Impact
- Attackers can execute arbitrary commands on the host system, leading to full system compromise.
- Remediation
- Update to version 4.17.21 or later.
Template by ProjectDiscovery nuclei-templates (DhiyaneshDk), MIT licensed. View the full template. Scan only systems you are authorised to test.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
In OpenShift ServiceMesh (OSSM) and Red Hat OpenShift Jaeger (RHOSJ) the affected containers are behind OpenShift OAuth authentication. This restricts access to the vulnerable nodejs-lodash library to authenticated users only, therefore the impact is low. While Red Hat Virtualization's cockpit-ovirt has a dependency…
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Migration Toolkit for Containers 1.7 | rhmtc/openshift-migration-ui-rhel8:v1.7.4-12 | RHSA-2022:6429 |
| Red Hat OpenShift Container Platform 4.8 | openshift4/ose-console:v4.8.0-202107010336.p0.git.188a490.assembly.stream | RHSA-2021:2438 |
| Red Hat OpenShift Jaeger 1.20 | distributed-tracing/jaeger-all-in-one-rhel8:1.20.4-18 | RHSA-2021:2543 |
| Red Hat Virtualization 4 for Red Hat Enterprise Linux 8 | cockpit-ovirt-0:0.15.1-2.el8ev | RHSA-2021:3459 |
| Red Hat Virtualization Engine 4.4 | ovirt-engine-ui-extensions-0:1.2.6-1.el8ev | RHSA-2021:2179 |
| Red Hat Discovery 2 | discovery/discovery-ui-rhel9:1775675922 | RHSA-2026:7329 |
Frequently Asked Questions
Is CVE-2021-23337 in your dependencies?
Find it across npm, RubyGems, including transitive dependencies.