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

Prototype pollution vulnerability in merge function #33

Closed
spratt opened this issue Mar 29, 2022 · 2 comments
Closed

Prototype pollution vulnerability in merge function #33

spratt opened this issue Mar 29, 2022 · 2 comments

Comments

@spratt
Copy link

spratt commented Mar 29, 2022

A vulnerability detection tool I use is flagging the merge function, and particularly this line: https://github.com/lukeed/dset/blob/master/src/merge.js#L9

The tool says that the function is vulnerable to prototype pollution as per this paper: https://github.com/HoLyVieR/prototype-pollution-nsec18/blob/master/paper/JavaScript_prototype_pollution_attack_in_NodeJS.pdf

Reading through the code and the paper, it seems like there is a check to mitigate prototype pollution in the dset function that uses merge, but not in merge itself. Would the merge function benefit from such a check? Or would that break something?

Thanks,
Simon

@n1ru4l
Copy link
Contributor

n1ru4l commented Apr 14, 2022

I created a PR for this: #34

@lukeed
Copy link
Owner

lukeed commented May 3, 2022

Closed by #34 and #38

@lukeed lukeed closed this as completed May 3, 2022
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

No branches or pull requests

3 participants