Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"npm audit" reports electron-settings as a high security vulnerability #179

Closed
KevinHughes opened this issue Feb 16, 2024 · 5 comments · Fixed by #180
Closed

"npm audit" reports electron-settings as a high security vulnerability #179

KevinHughes opened this issue Feb 16, 2024 · 5 comments · Fixed by #180

Comments

@KevinHughes
Copy link

KevinHughes commented Feb 16, 2024

When making an app using electron 28.2.3 or later, including electron-settings 4.0.2 or 5.0.0 as a dependency causes this output when running npm install or npm audit:

Severity: high
Prototype Pollution in lodash - https://github.com/advisories/GHSA-p6mc-m468-83gw
fix available via `npm audit fix --force`
Will install electron-settings@3.2.0, which is a breaking change
node_modules/lodash.set
  electron-settings  >=4.0.0
  Depends on vulnerable versions of lodash.set
  node_modules/electron-settings

2 high severity vulnerabilities

This workaround, which forces npm to override old versions of lodash.set in package.json...

"overrides": {
    "lodash.set@>=3.7.0 <4.17.19": "https://github.com/lodash/lodash/archive/f299b52f39486275a9e6483b60a410e06520c538.tar.gz"
}

...does not work as it prevents any settings from being written.

@Zalk0
Copy link
Contributor

Zalk0 commented Mar 16, 2024

Hey,
I saw this vulnerability and the lodash "Per Method Packages" are no longer actively supported and will be removed in lodash v5 as we can see on their website (https://lodash.com/per-method-packages).
The last version of lodash.set is 4.3.2 https://www.npmjs.com/package/lodash.set which is already the version of the dependency in electron-settings.
So this package would need to transition from per method packages to lodash directly.

@SteveW94
Copy link

Thanks a lot for already creating the Pull-Request! 👍

I hope it gets merged and pushed through as a new Release soon, as this security issues currently pops up as a very red flag also in our electron projects :/

@nathanbuchar
Copy link
Owner

4.0.3 is live. Please give it a try and let me know if it's working as expected.

@KevinHughes
Copy link
Author

It looks like everything is working as expected for me, thank you!

@SteveW94
Copy link

After regenerating our Lockfile which made everything use the new version and remove the old lodash packages, everything seems fine again. Thanks for your fast reaction :)

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 a pull request may close this issue.

4 participants