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 for Prototype Pollution #304

Merged
merged 1 commit into from Sep 3, 2021
Merged

Conversation

ready-research
Copy link
Contributor

@ready-research ready-research commented Sep 3, 2021

Summary

@xstyled/util is vulnerable to Prototype Pollution. This package allowing for modification of prototype behavior, which may result in Information Disclosure/DoS/RCE.

Test plan

util.merge({}, JSON.parse('{"__proto__":{"polluted":"Yes! Its Polluted"}}'));

Vulnerable line of code:
https://github.com/gregberge/xstyled/blob/46145a69a288b695313d20c5c5182939139267d8/packages/util/src/index.ts#L78

@netlify
Copy link

netlify bot commented Sep 3, 2021

‼️ Deploy request for xstyled rejected.
Learn more about Netlify's sensitive variable policy

🔨 Explore the source changes: cb8751f

@gregberge gregberge merged commit 34ed147 into styled-components:main Sep 3, 2021
@ready-research
Copy link
Contributor Author

@gregberge Please validate the issue in huntr and confirm the fix.
https://www.huntr.dev/bounties/1-gregberge/xstyled/ access using your GitHub login on the top right corner of huntr page. If yor are able to access it, then you can just click on mark as valid, and also you can confirm the fix.

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.

None yet

2 participants