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

Fix prototype pollution #362

Closed
gjasny opened this issue Oct 2, 2020 · 4 comments
Closed

Fix prototype pollution #362

gjasny opened this issue Oct 2, 2020 · 4 comments
Labels
support Questions, discussions, and general support

Comments

@gjasny
Copy link

gjasny commented Oct 2, 2020

Hello,

are you aware of the prototype pollution of lib/merge.js reported in 418sec/huntr#647?
Could you please provide a fixed version?

Thanks,
Gregor

@gjasny gjasny added the support Questions, discussions, and general support label Oct 2, 2020
@Marsup
Copy link
Contributor

Marsup commented Oct 2, 2020

Thanks for the report, I have some comments though:

  • First, what a shitty way to expose vulnerabilities in the open (not you, the original repo that does that, I understand you're not involved)
  • hoek has been deprecated for a very long time now, there's a warning you can't really miss on npm (https://www.npmjs.com/package/hoek)
  • As for the original report, it's not at all a prototype pollution, you have an object with a property "prototype" that contains all those things, that's it, it's just a POJO. If there was a prototype pollution, you'd be able to access the value with object.isAdmin, which is not the case in hoek nor in @hapi/hoek

@gjasny
Copy link
Author

gjasny commented Oct 2, 2020

Thank you for your comment. I'm a C++ developer, not a JavaScript one. I mostly interact with the JS world by triaging our internal static code analysis reports. Do I understand correctly that there is no vulnerability and you don't have to take any action?

@Marsup
Copy link
Contributor

Marsup commented Oct 2, 2020

Correct. Their report is a gross misunderstanding of how JS works, I'm not saying hoek is free of prototype pollution, but if that's the case we have no knowledge of that.

@cjihrig
Copy link
Contributor

cjihrig commented Oct 2, 2020

Closing as not an issue. Thanks for the report though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support Questions, discussions, and general support
Projects
None yet
Development

No branches or pull requests

3 participants