Summary
Missing sandboxing on /workspace/* routes allows challenge authors to inject arbitrary javascript which runs on the same origin as http://dojo.website
Details
All users can create public dojos that can run arbitrary code inside a docker container. However, some of the ports are exposed to the user via the http://dojo.website/workspace/* routes. While, generally, trusted programs run on these routes, challenge authors can override the processes running on them.
If a challenge author run a http server on any of these special ports (80, 6080, 8080), the input is forwarded with http://dojo.website as the origin. If a malicious author includes javascript, it is executed as if it is from the dojo or user.
PoC
- Create a dojo (any template works)
- Add a challenge
- Add a http server that serves
file.html
- In the
/challenge/.init file start the http server on any or all of the aforementioned ports
- Init the git repository (if not done already)
- Commit all the files into the git repository
- Push the files to a github repository
- Create or update a dojo with that repository
- Navigate to and run the challenge
- Open the corresponding workspace url to the port
- Javascript execution as
http://dojo.website occurs
Impact
This is a sandbox escape leading to arbitrary javascript execution as the dojo's origin. A challenge author can craft a page that executes any dangerous actions that the user could.
Summary
Missing sandboxing on
/workspace/*routes allows challenge authors to inject arbitrary javascript which runs on the same origin ashttp://dojo.websiteDetails
All users can create public dojos that can run arbitrary code inside a docker container. However, some of the ports are exposed to the user via the
http://dojo.website/workspace/*routes. While, generally, trusted programs run on these routes, challenge authors can override the processes running on them.If a challenge author run a http server on any of these special ports (80, 6080, 8080), the input is forwarded with
http://dojo.websiteas the origin. If a malicious author includes javascript, it is executed as if it is from the dojo or user.PoC
file.html/challenge/.initfile start the http server on any or all of the aforementioned portshttp://dojo.websiteoccursImpact
This is a sandbox escape leading to arbitrary javascript execution as the dojo's origin. A challenge author can craft a page that executes any dangerous actions that the user could.