CVE-2020-8203: Prototype Pollution in lodash
High CVSS 7.4
- OSV id
- GHSA-p6mc-m468-83gw
- Also known as
- CVE-2020-8203
- Published
- Last modified
Affected packages
| Package | Affected versions | Fixed in |
|---|---|---|
| lodash npm |
>= 3.7.0, < 4.17.19 | 4.17.19 |
| lodash-es npm |
>= 3.7.0, < 4.17.20 | 4.17.20 |
| lodash.pick npm |
>= 4.0.0, <= 4.4.0 | after 4.4.0 |
| lodash.set npm |
>= 3.7.0, <= 4.3.2 | after 4.3.2 |
| lodash.setwith npm |
<= 4.3.2 | after 4.3.2 |
| lodash.update npm |
<= 4.10.2 | after 4.10.2 |
| lodash.updatewith npm |
<= 4.10.2 | after 4.10.2 |
| lodash-rails RubyGems |
>= 3.7.0, < 4.17.19 | 4.17.19 |
Versions we track that it affects: lodash.pick 4.4.0;
How to fix it
lodash (npm)
Upgrade lodash to 4.17.19 or later.
npm install lodash@4.17.19
# if it is an indirect dependency: npm update lodash (or npm audit fix)
- If it is an indirect dependency, upgrade the package that depends on it, or force the version with "overrides" (npm), "resolutions" (Yarn) or "pnpm.overrides" (pnpm) in package.json.
- Check the changelog for breaking changes (especially across major versions), update the lockfile with the package manager, and run your tests.
lodash-es (npm)
Upgrade lodash-es to 4.17.20 or later.
npm install lodash-es@4.17.20
# if it is an indirect dependency: npm update lodash-es (or npm audit fix)
- If it is an indirect dependency, upgrade the package that depends on it, or force the version with "overrides" (npm), "resolutions" (Yarn) or "pnpm.overrides" (pnpm) in package.json.
- Check the changelog for breaking changes (especially across major versions), update the lockfile with the package manager, and run your tests.
lodash.pick (npm)
No fix yet. No fixed version of lodash.pick has been released yet.
- Check the advisory and its references below for a workaround or a configuration change that turns off the affected feature.
- Limit exposure: don't pass untrusted input to the affected code path, and keep it off public endpoints if you can.
- Pin away from the affected versions if an older release is not affected, or consider replacing the package.
- Watch for the fix: a free AIssue account checks your lockfiles every day and emails you when a fixed version is released.
lodash.set (npm)
No fix yet. No fixed version of lodash.set has been released yet.
- Check the advisory and its references below for a workaround or a configuration change that turns off the affected feature.
- Limit exposure: don't pass untrusted input to the affected code path, and keep it off public endpoints if you can.
- Pin away from the affected versions if an older release is not affected, or consider replacing the package.
- Watch for the fix: a free AIssue account checks your lockfiles every day and emails you when a fixed version is released.
lodash.setwith (npm)
No fix yet. No fixed version of lodash.setwith has been released yet.
- Check the advisory and its references below for a workaround or a configuration change that turns off the affected feature.
- Limit exposure: don't pass untrusted input to the affected code path, and keep it off public endpoints if you can.
- Pin away from the affected versions if an older release is not affected, or consider replacing the package.
- Watch for the fix: a free AIssue account checks your lockfiles every day and emails you when a fixed version is released.
lodash.update (npm)
No fix yet. No fixed version of lodash.update has been released yet.
- Check the advisory and its references below for a workaround or a configuration change that turns off the affected feature.
- Limit exposure: don't pass untrusted input to the affected code path, and keep it off public endpoints if you can.
- Pin away from the affected versions if an older release is not affected, or consider replacing the package.
- Watch for the fix: a free AIssue account checks your lockfiles every day and emails you when a fixed version is released.
lodash.updatewith (npm)
No fix yet. No fixed version of lodash.updatewith has been released yet.
- Check the advisory and its references below for a workaround or a configuration change that turns off the affected feature.
- Limit exposure: don't pass untrusted input to the affected code path, and keep it off public endpoints if you can.
- Pin away from the affected versions if an older release is not affected, or consider replacing the package.
- Watch for the fix: a free AIssue account checks your lockfiles every day and emails you when a fixed version is released.
lodash-rails (RubyGems)
Upgrade lodash-rails to 4.17.19 or later.
bundle update lodash-rails
# make sure the Gemfile allows "lodash-rails", ">= 4.17.19"
- If it is an indirect dependency, `bundle update` the gem that depends on it.
- Check the changelog for breaking changes (especially across major versions), update the lockfile with the package manager, and run your tests.
Not sure whether your project uses an affected version? Check your lockfile below for free.
Details
Versions of lodash prior to 4.17.19 are vulnerable to Prototype Pollution. The functions pick, set, setWith, update, updateWith, and zipObjectDeep allow a malicious user to modify the prototype of Object if the property identifiers are user-supplied. Being affected by this issue requires manipulating objects based on user-provided property values or arrays.
This vulnerability causes the addition or modification of an existing property that will exist on all objects and may lead to Denial of Service or Code Execution under specific circumstances.
References
- GHSA-p6mc-m468-83gw on OSV.dev
- Advisory: https://nvd.nist.gov/vuln/detail/CVE-2020-8203
- Web: https://github.com/lodash/lodash/issues/4744
- Web: https://github.com/lodash/lodash/issues/4874
- Web: https://github.com/github/advisory-database/pull/2884
- Web: https://github.com/lodash/lodash/commit/c84fe82760fb2d3e03a63379b297a1cc1a2fce12
- Web: https://hackerone.com/reports/712065
- Web: https://hackerone.com/reports/864701
- Package: https://github.com/lodash/lodash
- Web: https://github.com/lodash/lodash/wiki/Changelog#v41719
- Web: https://github.com/rubysec/ruby-advisory-db/blob/master/gems/lodash-rails/CVE-2020-8203.yml
- Web: https://security.netapp.com/advisory/ntap-20200724-0006
- Web: https://web.archive.org/web/20210914001339/https://github.com/lodash/lodash/issues/4744
Am I affected?
Upload or paste your lockfile. We check every package version in it against OSV.dev, this advisory included, and email you the vulnerable ones with the version that fixes them. Free, and no account needed.
About this data
Source: GitHub Advisory Database via OSV.dev (CC-BY 4.0). Severity comes from the advisory's own rating when it has one, else from its CVSS score.