CVE-2021-23337
Command Injection
Description
Lodash versions prior to 4.17.21 are vulnerable to Command Injection via the template function.
Severity (CVSS)
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
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- high: the attacker needs an administrative account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 20.6%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 98.0% of all scored CVEs. Scores of 26 Nov 2026.
The assessment of CISA (SSVC, 8 Oct 2026):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- yes: an attacker can automate the attack across many targets
- Technical impact
- total: full control of the component or of its data
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
|
Lodash
n/a
|
affected prior to 4.17.21
|
Is my server affected?
Find the installed version of lodash and compare it with the fixed version of your distribution. Distributions often fix a CVE in their own package version, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i lodash
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2021-23337 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2021-23337RHEL, Rocky, Alma, Fedora
rpm -q lodash
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2021-23337Alpine
apk list --installed | grep -i lodashWith Trivy, on the host and for a container image; it prints the installed and the fixed version when a package is affected:
trivy rootfs --scanners vuln / | grep CVE-2021-23337
trivy image --scanners vuln IMAGE | grep CVE-2021-23337
Patchbrief matches the package lists of your Linux servers and containers every day against the Trivy vulnerability database, which covers the packages of Linux distributions and language packages (npm, PyPI, Go, Maven and others), and sends one digest with the command that fixes each problem. Install the agent.
References
Advisories
- https://security.netapp.com/advisory/ntap-20210312-0006/ security.netapp.com
- https://cert-portal.siemens.com/productcert/pdf/ssa-637483.pdf cert-portal.siemens.com
Other references
- https://snyk.io/vuln/SNYK-JS-LODASH-1040724 snyk.io
- https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWER-1074928 snyk.io
- https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-1074929 snyk.io
- https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARS-1074930 snyk.io
- https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWERGITHUBLODASH-1074931 snyk.io
- https://snyk.io/vuln/SNYK-JAVA-ORGFUJIONWEBJARS-1074932 snyk.io
- https://github.com/lodash/lodash/blob/ddfd9b11a0126db2302cb70ec9973b66baec0975/lodash.js%23L14851 github.com
- https://www.oracle.com//security-alerts/cpujul2021.html oracle.com
- https://www.oracle.com/security-alerts/cpuoct2021.html oracle.com
- https://www.oracle.com/security-alerts/cpujan2022.html oracle.com
- https://www.oracle.com/security-alerts/cpujul2022.html oracle.com
Guides
- npm audit, lockfiles and npm ci Commit package-lock.json, install with npm ci, read npm audit output, fail CI on high findings and fix transitive packages with overrides.
Source: the record CVE-2021-23337 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.