Skip to content
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

Review ES6 impact #25

Open
natevw opened this issue Jun 30, 2016 · 7 comments
Open

Review ES6 impact #25

natevw opened this issue Jun 30, 2016 · 7 comments

Comments

@natevw
Copy link
Owner

natevw commented Jun 30, 2016

E.g. does the Reflect API (intro here: http://blog.keithcirkel.co.uk/metaprogramming-in-es6-part-2-reflect/) change anything? new.target? Anything else?

@Mickael-van-der-Beek
Copy link

Mickael-van-der-Beek commented Jun 30, 2016

Well both Symbol and Reflect are not exposed to the Evel sandbox scope so that shouldn't change anything.

Or did you ask the question in case one or both of those API were to be exposed to the sandbox?

@natevw
Copy link
Owner Author

natevw commented Jul 7, 2016

@Mickael-van-der-Beek That Symbol and Reflect aren't exposed is really a bug (now filed as #26), although certainly with the latter it's probably good that it can reviewed a bit more

@natevw
Copy link
Owner Author

natevw commented Oct 17, 2017

Finally started diving into this, although only a bit. So far the couple things that stood out as needing a closer look would be Reflect.construct and Symbol.for but both of those seem relatively harmless so far.

Also need to review what surfaces Symbol.species / Symbol.iterator and such would give access to.

@natevw
Copy link
Owner Author

natevw commented Oct 17, 2017

Also new.target seems to be harmless in my quick testing:

(function () {
  function Foo() {
    return new.target.prototype.constructor.constructor.constructor;
  }
  return new Foo();
})()

still returns evel.Function as it should.

@natevw
Copy link
Owner Author

natevw commented Oct 31, 2017

What about AsyncFunction from Object.getPrototypeOf(async function(){})? https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AsyncFunction

@Mickael-van-der-Beek
Copy link

@natevw Those are indeed leaked through the syntax as well. e.g:

(function*(){}).constructor('yield this')().next().value.alert(1)

and

(async function(){}).constructor('this.alert(1);')()

Even though code execution is possible, it's not possible to pop an alert box due to the iframe not being attached to the DOM.

To my knowledge, it's also not possible to escape the iframe itself.

@Mickael-van-der-Beek
Copy link

It also seems like Caja has had similar issues recently: http://blog.bentkowski.info/2017/11/yet-another-google-caja-bypasses-hat.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants