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

Guard against prototype pollution #630

Merged
merged 1 commit into from
Apr 17, 2024
Merged

Conversation

ericyhwang
Copy link
Contributor

@ericyhwang ericyhwang commented Apr 17, 2024

In several places, strings used as object keys can cause prototype pollution. While these strings are almost always developer-controlled, not end-user-controlled, it's still good to be defensive.

This guards against the key "proto" and all keys on Object.prototype, which includes "constructor".

GHSA-82jv-9wjw-pqh6

In several places, strings used as object keys can cause prototype pollution. While these strings are almost always developer-controlled, not end-user-controlled, it's still good to be defensive.
Copy link
Contributor

@craigbeck craigbeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM

@ericyhwang ericyhwang merged commit 465a0c2 into master Apr 17, 2024
5 checks passed
@ericyhwang ericyhwang deleted the proto-pollution-guard branch April 17, 2024 21:45
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.

2 participants