# Command Injection in lodash

Advisory record · `GHSA-35jh-r3h4-6jhm`

- **Identifiers:** `GHSA-35jh-r3h4-6jhm` · `CVE-2021-23337`
- **State:** Confirmed
- **Severity:** CVSS 7.2 High
- **Critical:** Yes: CVSS 7+ and EPSS
- **Weakness (CWE):** [CWE-77](https://cwe.mitre.org/data/definitions/77.html) · [CWE-94](https://cwe.mitre.org/data/definitions/94.html)
- **Tags:** [Command injection](https://agentprime.io/advisories/tag/command-injection.md) · [Code injection](https://agentprime.io/advisories/tag/code-injection.md)
- **Published:** 6 May 2021
- **Updated:** 17 Oct 2026
- **Reviewed by a person:** No

Published by the GitHub Advisory Database at 6 May 2021, 16:05 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

## Critical

Critical, because:

- CVSS score 7.2 (7.0 or more) and EPSS 0.21 (0.1 or more): a high score and a real chance of exploitation in the next 30 days.

How we decide what’s critical: <https://agentprime.io/advisories/critical.md>

## Affected packages

- `lodash` (npm): affected `<4.17.21`; fixed in `4.17.21`
- `lodash-es` (npm): affected `<4.17.21`; fixed in `4.17.21`
- `lodash.template` (npm): affected `<=4.5.0`; no fixed version yet
- `lodash-template` (npm): affected `<=1.0.0`; no fixed version yet
- `lodash-rails` (RubyGems): affected `<4.17.21`; fixed in `4.17.21`

## Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

> Lodash versions before 4.17.21 (npm lodash, lodash-es, and RubyGems lodash-rails) are vulnerable to command injection through the template function. The source gives few details about what an attacker must supply or what conditions are needed. Upgrade lodash, lodash-es, and lodash-rails to 4.17.21 or later. The lodash-template (1.0.0 and earlier) and lodash.template (4.5.0 and earlier) packages have no fixed version listed.

Written 31 Oct 2026.

## Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

## Severity and exploitation

- 7.2 High, CVSS 3.1: `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`, from CNA (snyk)

- **CISA KEV:** Not listed.
- **EPSS:** 0.21, the 97th percentile, on 9 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

- 31 Oct 2026, 13:33 UTC: First seen by agentprime
- 31 Oct 2026, 13:33 UTC: [Confirmed by OSV](https://osv.dev/vulnerability/GHSA-35jh-r3h4-6jhm)

## Sources

- [GitHub Advisory Database: GHSA-35jh-r3h4-6jhm](https://github.com/advisories/GHSA-35jh-r3h4-6jhm)
- [OSV: GHSA-35jh-r3h4-6jhm](https://osv.dev/vulnerability/GHSA-35jh-r3h4-6jhm)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-23337>
- <https://github.com/lodash/lodash/commit/3469357cff396a26c363f8c1b5a91dde28ba4b1c>
- <https://www.oracle.com/security-alerts/cpuoct2021.html>
- <https://www.oracle.com/security-alerts/cpujul2022.html>
- <https://www.oracle.com/security-alerts/cpujan2022.html>
- <https://www.oracle.com//security-alerts/cpujul2021.html>
- <https://snyk.io/vuln/SNYK-JS-LODASH-1040724>
- <https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-1074929>
- <https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWERGITHUBLODASH-1074931>
- <https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWER-1074928>
- <https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARS-1074930>
- <https://snyk.io/vuln/SNYK-JAVA-ORGFUJIONWEBJARS-1074932>

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.

## Check whether this affects you

A Match means an installed version is in the affected range above. Most don’t affect the app; agentprime hasn’t analysed this one yet.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), ask your agent to check the project: `check_lockfile` sends a lockfile, `check_packages` a list of installed packages, and both return the Matches and the upgrades that clear them. `get_advisory` returns this record. Setup: <https://agentprime.io/mcp.md>
- In a browser: <https://agentprime.io/check/> reads your lockfile in the browser, never uploading it.
- Whether it touches your code, with file and line: the Claude Code plugin, <https://agentprime.io/plugin.md>
- As JSON: <https://api.agentprime.io/v1/advisories/GHSA-35jh-r3h4-6jhm>, or `POST https://api.agentprime.io/v1/match` with your packages (<https://agentprime.io/api.md>)

---

The web page: <https://agentprime.io/advisories/GHSA-35jh-r3h4-6jhm/>. Everything for agents: <https://agentprime.io/llms.txt>.
