# CVE-2021-23337: Command Injection

> Attackers can execute arbitrary commands via the template function in the Lodash JavaScript library, requiring an upgrade to the latest version.

- **Severity:** High 7.2 (`CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H/E:P/RL:U/RC:C`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 15 Feb 2021
- **Updated:** 8 Oct 2026
- **Also known as:** AZL-44655, CLSA-2026-1775003202, CLSA-2026-1784682758, DEBIAN-CVE-2021-23337, GHSA-35jh-r3h4-6jhm, MINI-c9vg-9mv6-rq7w, MINI-h6fg-gcmq-jx4h, MINI-x6xv-4pxg-hwmg, ROOT-APP-NPM-CVE-2021-23337, UBUNTU-CVE-2021-23337

## What is CVE-2021-23337?

CVE-2021-23337 is a high-severity command injection vulnerability in Netapp Active Iq Unified Manager, published on 15 Feb 2021. An attacker needs administrator access to exploit it, with no action from the victim.

### Official description

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

Weakness: CWE-94 (Improper Control of Generation of Code)

## Which versions are affected by CVE-2021-23337?

10 open source packages ship an affected version, including lodash-rails, lodash and lodash-es. It affects 23 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `lodash-rails` | RubyGems | All versions | 4.17.21 |
| `lodash-rails` | RubyGems | All versions | 4.17.21 |
| `lodash` | npm | All versions | 4.17.21 |
| `lodash` | npm | All versions | 4.17.21 |
| `lodash-es` | npm | All versions | 4.17.21 |
| `lodash-es` | npm | All versions | 4.17.21 |
| `lodash-template` | npm | All versions to 1.0.0 | None |
| `lodash-template` | npm | All versions to 1.0.0 | None |
| `lodash.template` | npm | All versions to 4.5.0 | None |
| `lodash.template` | npm | All versions to 4.5.0 | None |

Products: Lodash Lodash, Netapp Active Iq Unified Manager, Netapp Cloud Manager, Netapp System Manager, Oracle Banking Corporate Lending Process Management, Oracle Banking Credit Facilities Process Management, Oracle Banking Extensibility Workbench, Oracle Banking Supply Chain Finance, Oracle Banking Trade Finance Process Management, Oracle Communications Cloud Native Core Binding Support Function, Oracle Communications Cloud Native Core Policy, Oracle Communications Design Studio, Oracle Communications Services Gatekeeper, Oracle Communications Session Border Controller, Oracle Enterprise Communications Broker, Oracle Financial Services Crime and Compliance Management Studio, Oracle Health Sciences Data Management Workbench, Oracle Jd Edwards Enterpriseone Tools, Oracle Peoplesoft Enterprise Peopletools, Oracle Primavera Gateway and 3 more.

## How do I fix CVE-2021-23337?

Upgrade lodash-rails to 4.17.21 or later.

## Is CVE-2021-23337 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2021-23337 exists.

Public exploit code:

- Fork of lodash.template with CVE-2021-23337 fix (command injection via variable option) (github_poc): https://github.com/khayashi4337/lodash.template-fixed
- Lodash Template - Server-Side Template Injection (RCE) (nuclei): http/cves/2021/CVE-2021-23337.yaml

## Other vulnerabilities in Netapp Active Iq Unified Manager

- [CVE-2026-4800](https://insights.sbomify.com/CVE-2026-4800/): lodash vulnerable to Code Injection via `_.template` imports key names (high 8.1)
- [CVE-2020-8203](https://insights.sbomify.com/CVE-2020-8203/): Prototype Pollution in lodash (high 7.4)
- [CVE-2025-13465](https://insights.sbomify.com/CVE-2025-13465/): Prototype Pollution Vulnerability in Lodash _.unset and _.omit functions (medium 6.9)
- [CVE-2026-2950](https://insights.sbomify.com/CVE-2026-2950/): lodash vulnerable to Prototype Pollution via array path bypass in `_.unset` and `_.omit` (medium 6.5)
- [CVE-2019-1010266](https://insights.sbomify.com/CVE-2019-1010266/): Regular Expression Denial of Service (ReDoS) in lodash (medium 6.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2021-23337 and fix it if it is affected.

What it is: CVE-2021-23337 is a high-severity command injection vulnerability in Netapp Active Iq Unified Manager, published on 15 Feb 2021. An attacker needs administrator access to exploit it, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2021-23337 exists.

Affected packages and fixed versions:
- lodash-rails (RubyGems): affected all versions; fixed in 4.17.21
- lodash-rails (RubyGems): affected all versions; fixed in 4.17.21
- lodash (npm): affected all versions; fixed in 4.17.21
- lodash (npm): affected all versions; fixed in 4.17.21
- lodash-es (npm): affected all versions; fixed in 4.17.21
- lodash-es (npm): affected all versions; fixed in 4.17.21
- lodash-template (npm): affected all versions up to 1.0.0; no fix listed
- lodash-template (npm): affected all versions up to 1.0.0; no fix listed
- lodash.template (npm): affected all versions up to 4.5.0; no fix listed
- lodash.template (npm): affected all versions up to 4.5.0; no fix listed

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2021-23337/ (Markdown: https://insights.sbomify.com/CVE-2021-23337/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2021-23337
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2021-23337
- OSV: https://osv.dev/vulnerability/CVE-2021-23337

---
From sbomify Insights: https://insights.sbomify.com/CVE-2021-23337/
Summaries are generated and may contain mistakes; the official description above is the record.
