Code injection in ejs package for node,js



Published: 2021-02-15
Risk Medium
Patch available YES
Number of vulnerabilities 1
CVE-ID N/A
CWE-ID CWE-94
Exploitation vector Network
Public exploit N/A
Vulnerable software
Subscribe
EJS
Web applications / JS libraries

Vendor EJS

Security Bulletin

This security bulletin contains one medium risk vulnerability.

1) Code Injection

EUVDB-ID: #VU50710

Risk: Medium

CVSSv3.1: 4.7 [CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N/E:U/RL:O/RC:C]

CVE-ID: N/A

CWE-ID: CWE-94 - Improper Control of Generation of Code ('Code Injection')

Exploit availability: No

Description

The vulnerability allows a remote attacker to execute arbitrary JS code on the target system.

The vulnerability exists due to improper input validation passed via the filename in lib/ejs.js. A remote attacker can send a specially crafted request and execute arbitrary JavaScript code in victim's browser.


Mitigation

Install updates from vendor's website.

Vulnerable software versions

EJS: 2.0.1 - 3.1.5

External links

http://github.com/mde/ejs/commit/abaee2be937236b1b8da9a1f55096c17dda905fd


Q & A

Can this vulnerability be exploited remotely?

Yes. This vulnerability can be exploited by a remote non-authenticated attacker via the Internet.

Is there known malware, which exploits this vulnerability?

No. We are not aware of malware exploiting this vulnerability.



###SIDEBAR###