You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Initially disclosed to @mizlan privately. Opening this issue for easier tracking and documentation.
Vulnerability
On https://editor.uclaacm.com, there is an arbitrary Same-OriginStored XSS for outputs of the editor specifically for both React & HTML. The issue arrises from lack of sandboxing of the output while using srcdoc causing the embedded content to be on the same origin as the editor (source code). The impact could be that an adversary is able to share a page with a payload which could exfiltrate private data about a user or lead to arbitrary writes or downloads.
POC
React:
HTML:
Fix
The solution to this is to introduce the sandbox property to the output iframe. This can be done in the following source code with a behavior of sandbox="allow-scripts allow-modals". This would allow many of the current features to be maintained while allowing resources to be isolated by the Same-Origin Policy.
The text was updated successfully, but these errors were encountered:
Initially disclosed to @mizlan privately. Opening this issue for easier tracking and documentation.
Vulnerability
On https://editor.uclaacm.com, there is an arbitrary Same-Origin Stored XSS for outputs of the editor specifically for both React & HTML. The issue arrises from lack of sandboxing of the output while using
srcdoc
causing the embedded content to be on the same origin as the editor (source code). The impact could be that an adversary is able to share a page with a payload which could exfiltrate private data about a user or lead to arbitrary writes or downloads.POC
React:
HTML:
Fix
The solution to this is to introduce the
sandbox
property to the output iframe. This can be done in the following source code with a behavior ofsandbox="allow-scripts allow-modals"
. This would allow many of the current features to be maintained while allowing resources to be isolated by the Same-Origin Policy.The text was updated successfully, but these errors were encountered: