-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
json should be sanitized on import #7089
Comments
Verified fixed Testathon 10/5/23 |
For the local storage verification, should it be I think this is working as expected. |
Another issue here is that the Import as JSON action accumulates objects if they fail for any reason on import (such as prototype pollution). This is because actions are singletons and we are storing state on the ImportFromJSONAction. This can result in a "denial of service" rendering the ImportAsJSONAction unusable until a refresh is performed. The action will keep attempting to process the accumulated objects in Although we have closed the prototype pollution attack vector, we have not fixed the "denial of service" problem which might be exploitable by other means. The right way to prevent this is to avoid storing state on the ImportFromJSONAction altogether. Instead of a member variable, |
Great catch. I'll make that change. |
Summary
Prevent users from polluting the object's prototype.
Expected vs Current Behavior
Should not be permitted to pollute prototype using import function.
Should not be permitted to pollute prototype by modifying local storage.
Testing Instructions (import)
To examine the object
Testing Instructions (localstorage)
mct
Environment
Impact Check List
Additional Information
{"openmct":{"c28d230d-e909-4a3e-9840-d9ef469dda70":{"identifier":{"key":"c28d230d-e909-4a3e-9840-d9ef469dda70","namespace":""},"name":"Unnamed Overlay Plot","type":"telemetry.plot.overlay","composition":[],"configuration":{"series":[]},"modified":1695837546833,"location":"mine","created":1695837546833,"persisted":1695837546833,"__proto__":{"toString":"foobar"}}},"rootId":"c28d230d-e909-4a3e-9840-d9ef469dda70"}
The text was updated successfully, but these errors were encountered: