GHSA-35jh-r3h4-6jhm
HIGH
Command Injection in lodash
Published May 6, 2021Updated August 12, 2025Source: osv
Details
`lodash` versions prior to 4.17.21 are vulnerable to Command Injection via the template function.
Remediation
Upgrade to the fixed version using your package manager.
npm
Update lodash to 4.17.21 or laternpm install lodash@4.17.21
Bundler
Update lodash-rails to 4.17.21 or latergem install lodash-rails -v 4.17.21
npm
Update lodash-es to 4.17.21 or laternpm install lodash-es@4.17.21
After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.
Affected Packages (5)
| Package | Ecosystem | Affected | Fixed In |
|---|---|---|---|
| lodash | npm | All versions | 4.17.21 |
| lodash-rails | RubyGems | 0.10.0, 0.7.0, 0.8.1, 0.8.2 (+51 more) | 4.17.21 |
| lodash-es | npm | All versions | 4.17.21 |
| lodash.template | npm | All versions | Range-based data available |
| lodash-template | npm | All versions | Range-based data available |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-77
- CWE-94Code InjectionMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 3.1 score means for each attack dimension.
Attack Vector
Network
Attack Complexity
Low
Privileges Required
High
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
References
- https://nvd.nist.gov/vuln/detail/CVE-2021-23337ADVISORY
- https://github.com/lodash/lodash/commit/3469357cff396a26c363f8c1b5a91dde28ba4b1cWEB
- https://www.oracle.com/security-alerts/cpuoct2021.htmlWEB
- https://www.oracle.com/security-alerts/cpujul2022.htmlWEB
- https://www.oracle.com/security-alerts/cpujan2022.htmlWEB
- https://www.oracle.com//security-alerts/cpujul2021.htmlWEB
- https://snyk.io/vuln/SNYK-JS-LODASH-1040724WEB
- https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-1074929WEB
- https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWERGITHUBLODASH-1074931WEB
- https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWER-1074928WEB
- https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARS-1074930WEB
- https://snyk.io/vuln/SNYK-JAVA-ORGFUJIONWEBJARS-1074932WEB
- https://security.netapp.com/advisory/ntap-20210312-0006WEB
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/lodash-rails/CVE-2021-23337.ymlWEB
- https://github.com/lodash/lodash/blob/ddfd9b11a0126db2302cb70ec9973b66baec0975/lodash.js#L14851WEB
- https://github.com/lodash/lodashPACKAGE
- https://cert-portal.siemens.com/productcert/pdf/ssa-637483.pdfWEB
Risk Assessment
CVSS Score
3.1
Exploitation is difficult or impact is minor. Address in your next planned update.
EPSS Score (30-day exploit probability)
0.74%
Higher than 73% of vulnerabilities
Also Known As
Check if you're affected
Scan your dependencies to see if this vulnerability affects your projects.
Scan Your Dependencies