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: fix prototype pollution vulnerability #13

Merged
merged 2 commits into from Dec 28, 2020
Merged

Conversation

sahellebusch
Copy link
Owner

From WhiteSource:

The NPM module 'flattenizer' can be abused by Prototype Pollution vulnerability since the function
'unflatten()' did not check for the type of object before assigning value to the property. Due to this flaw
an attacker could create a non-existent property or able to manipulate the property which leads to
Denial of Service or potentially Remote code execution.

Proof of concept code:

var flattenizer = require("flattenizer")
flattenizer.unflatten({'__proto__.polluted': true});
console.log(polluted);

From whitesource:
The NPM module 'flattenizer' can be abused by Prototype Pollution vulnerability since the function
'unflatten()' did not check for the type of object before assigning value to the property. Due to this flaw
an attacker could create a non-existent property or able to manipulate the property which leads to
Denial of Service or potentially Remote code execution.

Proof of concept code:
```
var flattenizer = require("flattenizer")
flattenizer.unflatten({'__proto__.polluted': true});
console.log(polluted);
```
@sahellebusch sahellebusch merged commit 3c6a635 into master Dec 28, 2020
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

1 participant