#VU50710 Code Injection in EJS


Published: 2021-02-15

Vulnerability identifier: #VU50710

Vulnerability 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

Exploitation vector: Network

Exploit availability: No

Vulnerable software:
EJS
Web applications / JS libraries

Vendor: EJS

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.


Latest bulletins with this vulnerability