HexBrain

GitLab · Report #437142

Instant open redirect on Live preview WEB Ide opening

Validstatus
lowseverity
$1,000bounty
20upvotes
4 Nov 2020disclosed

How it was found

Hello Gitlab team! Asset is my own gitlab installation for Ubuntu.

The issue I want to report is lack of sandbox attribute in iframe pointing to codesandbox. This results content inside iframe redirect top level window on load.

How to reproduce:

  1. create index.js with following content:
window.open("https://evil.com","_top");
  1. create package.json with following content:
{
  "main": "index.js",
  "dependencies": {
    "vue": "latest"
  }
}
  1. open file in Web IDE and load preview

How to fix:

  1. add sandbox attribute with needed permissions (for example, you need allow-scripts for sure) on codesandbox iframe.

Impact

Open redirect on web ide preview load.

This report was disclosed publicly on HackerOne and belongs to its author and the program. See the original