-
Notifications
You must be signed in to change notification settings - Fork 10
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 vulnerability #69
Conversation
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.
Do we need to sanitize nested objects as well? What about an XML payload of (e.g.)
<foo>
<bar>
<__proto__>
<name>Bob</name>
</__proto__>
</bar>
</foo>
From what I can gather about prototype pollution, it can happen if __proto__
is overridden on any object?
Co-authored-by: Tom Spencer <[email protected]>
Did you have any thoughts on this? |
I tested that. But doesn't seem to be vulnerable. The fix seems perfect for me now. |
CI is failing: need to run |
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.
Thank you for the contribution, released as 2.0.3
Set the prototype of parsed xml object to undefined, so that prototype pollution is prevented.