Skip to content

fix(): use full lodash instead of per-method pkgs#792

Merged
kamilmysliwiec merged 2 commits intonestjs:masterfrom
shaunek:remediate-lodash.set-vuln
Jan 3, 2022
Merged

fix(): use full lodash instead of per-method pkgs#792
kamilmysliwiec merged 2 commits intonestjs:masterfrom
shaunek:remediate-lodash.set-vuln

Conversation

@shaunek
Copy link
Copy Markdown
Contributor

@shaunek shaunek commented Dec 30, 2021

This change remediates a high severity vulnerability in the lodash.set
package dependency by replacing lodash.set, lodash.has, and lodash.get
packages with the full lodash. The full lodash is required because the
per-method packages are abandoned and no longer updated. #791

This change also removes an unnecessary eslint rule that was giving an
error when running npm run lint. See https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md#version-800-2021-02-21 for more detail.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

What is the current behavior?

Issue Number: #791 The lodash.set dependency has a Prototype Pollution vulnerability. A call to lodash's set method like this set({} "__proto__[test]", "123"); will result in the Object.prototype being modified.

What is the new behavior?

Using the full lodash dependency this vulnerability is no longer present. No change in functionality

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Snyk security bulletin describing the vuln: https://security.snyk.io/vuln/SNYK-JS-LODASHSET-1320032
Original HackerOne report: https://hackerone.com/reports/864701

This change remediates a high severity vulnerability in the lodash.set
package dependency by replacing lodash.set, lodash.has, and lodash.get
packages with the full lodash. The full lodash is required because the
per-method packages are abandoned and no longer updated.

This change also removes an uncessary eslint rule that was giving an
error when running `npm run lint`. See https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md#version-800-2021-02-21 for more detail.
@kamilmysliwiec kamilmysliwiec merged commit 9d56134 into nestjs:master Jan 3, 2022
@thematan thematan mentioned this pull request Aug 30, 2023
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants