Skip to content

[CVE-2017-16088] Sandbox Breakout (Critical Security Fix) - context clear#15

Open
kaue wants to merge 12 commits into
hacksparrow:masterfrom
kaue:patch-2
Open

[CVE-2017-16088] Sandbox Breakout (Critical Security Fix) - context clear#15
kaue wants to merge 12 commits into
hacksparrow:masterfrom
kaue:patch-2

Conversation

@kaue
Copy link
Copy Markdown
Contributor

@kaue kaue commented Dec 15, 2018

No description provided.

kaue added 12 commits November 15, 2018 18:28
should not have access to Node.js objects
lint
0.4.2
should not have access to Node.js objects using Object.getPrototypeOf (CWE-265)
should not have access to Node.js objects using Object.getPrototypeOf with context (CWE-265)
should check prototype also
lint
lint
stop using template string for clearContext function
@ChrisCinelli
Copy link
Copy Markdown

Why is this not merged and released? I reported to the npm team.

@hacksparrow
Copy link
Copy Markdown
Owner

@ChrisCinelli Function = undefined. We can't overwrite a global object.

@ChrisCinelli
Copy link
Copy Markdown

@kauegimenes :
You could also add this test to verify that #12 is fixed:

  it("should not modify Object's constructor", function () {
    var evaluatedBefore = Object.getOwnPropertyDescriptor(Object, 'constructor')
    console.log(evaluatedBefore)
    assert(evaluatedBefore === undefined)
    safeEval('42')
    var evaluatedAfter = Object.getOwnPropertyDescriptor(Object, 'constructor')
    console.log(evaluatedBefore)
    assert(evaluatedAfter === undefined)
  })

@ChrisCinelli ChrisCinelli mentioned this pull request Dec 29, 2018
@ChrisCinelli
Copy link
Copy Markdown

Just added comments on #16. This only fixes one tiny vulnerability.

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

Successfully merging this pull request may close these issues.

3 participants