Skip to content

resolve-shims: prevent prototype manipulation #246

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

Merged
merged 1 commit into from
Oct 14, 2022

Conversation

bendrucker
Copy link
Collaborator

Prevents prototype manipulation in the separateExposeGlobals function. The supplied shims are parsed from JSON and could in theory contain a __proto__ key. It is not clear that this is even exploitable to manipulate the any behavior of exposeGlobals, let alone the global object prototype.

Nevertheless, out of an abundance of caution, this forbids passing __proto__ or constructor as shims.

Closes #245

@bendrucker bendrucker merged commit 97855e6 into master Oct 14, 2022
@bendrucker bendrucker deleted the resolve-shims-prototype branch October 14, 2022 17:27
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.

CVE-2022-37617/ Prototype pollution found in resolve-shims.js
1 participant