-
Notifications
You must be signed in to change notification settings - Fork 143
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
Security Fix for Prototype Pollution - huntr.dev #384
Conversation
Security fix for prototype pollution
Hey |
Not to pester but this issue has been public for almost 2 months now with no apparent activity, and I can't seem to get in touch with any active maintainers by email. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks good to me. thank you @huntr-helper :)
sorry y'all. this repo has been in limbo and without a primary maintainer. i'm now serving as an interim. i'll be pushing a patch release to npm shortly |
@dannycoates - thanks for the merge and support here! 👍 If you are interested in more fixes, you can let security researchers know that they can win bounties protecting this repo by adding this badge into your
|
hey @dannycoates, should we have a CWE for this vulnerability, so that github / npm warns our users? |
This prototype pollution vulnerability has been more completely fixed with 3b86be0 and the publishing of [email protected] on NPM. |
Thanks @madarche ! |
We are happy to help assign and publish a CVE for the original report here: @madarche - let me know if you would like us to take care of this 👍 |
@julienw @JamieSlome, I have been in contact with Snyk which has published an advisory: https://security.snyk.io/vuln/SNYK-JS-CONVICT-2340604 and has reserved a CVE: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-22143 For everyone: all versions of convict from the start up to and including 6.2.1 are vulnerable to prototype pollution. How to fix: Upgrade convict to version 6.2.2 or higher. |
Additionally I've contacted the npm team. I'll report here when I have an answer. |
@madarche - can we add credit for @arjunshibu and also attach the original report as reference: |
@JamieSlome I've just added credit for @arjunshibu in the advisory! Sorry for the omission, I tried to credit everyone, but I missed @arjunshibu! Sorry! But now it's fixed! |
Amazing, thank you so much! 👍 No apologies needed - really appreciate your time and effort on this issue. |
So to be complete on this, here is the published security advisory: GHSA-x2w5-725j-gf2g This advisory can be found independently from the Security tab of the project, but it's best to have a direct explicit link from here. Thanks to everyone involved! |
vulnerability first addressed in #384
I'm sorry to announce that the prototype pollution vulnerability was not fully fixed in the previous release either [email protected] has this vulnerability fixed and has been published to NPM. The security advisory GHSA-x2w5-725j-gf2g has also been updated to state that all versions previous to 6.2.3 are vulnerable. On the code side, the one and only good solution is of course to use Maps instead of Objects, but I really haven't anytime for this refactoring at this moment. But we should be safe with this last fix until this refactoring. |
https://huntr.dev/users/arjunshibu has fixed the Prototype Pollution vulnerability 🔨. Think you could fix a vulnerability like this?
Get involved at https://huntr.dev/
Q | A
Version Affected | ALL
Bug Fix | YES
Original Pull Request | 418sec#1
Vulnerability README | https://github.com/418sec/huntr/blob/master/bounties/npm/convict/1/README.md
User Comments:
📊 Metadata *
convict
is vulnerable to Prototype Pollution. This package allowing for modification of prototype behavior, which may result in Information Disclosure/DoS/RCE.Bounty URL: https://www.huntr.dev/bounties/1-npm-convict
⚙️ Description *
Prototype Pollution refers to the ability to inject properties into existing JavaScript language construct prototypes, such as objects.
JavaScript allows all Object attributes to be altered, including their magical attributes such as proto, constructor and prototype.
An attacker manipulates these attributes to overwrite, or pollute, a JavaScript application object prototype of the base object by injecting other values. Properties on the Object.prototype are then inherited by all the JavaScript objects through the prototype chain.
💻 Technical Description *
Fix implemented by not allowing to modify object prototype.
🐛 Proof of Concept (PoC) *
🔥 Proof of Fix (PoF) *
Prototype pollution is fixed as seen below.
👍 User Acceptance Testing (UAT)