LavaMoat / snow

Use Snow to finally secure your web app's same origin realms!
https://lavamoat.github.io/snow/demo/
MIT License
102 stars 9 forks source link

Fix: Snow can be bypassed by redefining indexed properties (issue #8) #15

Closed weizman closed 2 years ago

weizman commented 2 years ago

As discovered by Benji at issue #8 Snow is vulnerable to outside code that redefines index properties of Array/Object prototypes.

Fixed by making Snow only use arrays and objects that originate by Securely so that they will belong to Securely's protected realm instead of the top vulnerable one.

Also added a test that will break every time an access to an indexed property of an array/object that was made in a non-Securely realm is being made so that keeping Snow in line will be rather easy.