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

No CVE - medium detected in ejs['1.0.0', '0.8.8'] #307

Open
github-actions bot opened this issue Aug 1, 2022 · 0 comments
Open

No CVE - medium detected in ejs['1.0.0', '0.8.8'] #307

github-actions bot opened this issue Aug 1, 2022 · 0 comments

Comments

@github-actions
Copy link

github-actions bot commented Aug 1, 2022

Package Name: ejs
Package Version: ['1.0.0', '0.8.8']
Package Manager: npm
Target File: package.json
Severity Level: medium
Snyk ID: SNYK-JS-EJS-1049328
Snyk CVE: No CVE
Snyk CWE: CWE-94
Link to issue in Snyk: https://app.snyk.io/org/cse_rhicksiii91/project/14f822de-b806-4bd7-9ad2-767a7feebe1d

Snyk Description: ## Overview
ejs is a popular JavaScript templating engine.

Affected versions of this package are vulnerable to Arbitrary Code Injection via the render and renderFile. If external input is flowing into the options parameter, an attacker is able run arbitrary code. This include the filename, compileDebug, and client option.

POC

let ejs = require('ejs')
ejs.render('./views/test.ejs',{
    filename:'/etc/passwd\nfinally { this.global.process.mainModule.require(\'child_process\').execSync(\'touch EJS_HACKED\') }',
    compileDebug: true,
    message: 'test',
    client: true
})

Remediation

Upgrade ejs to version 3.1.6 or higher.

References


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

0 participants