CVE-2021-23383: Prototype Pollution
A flaw was found in nodejs-handlebars. A unescaped value in the JavaScriptCompiler.prototype.depthedLookup function allows an attacker, who can provide untrusted handlebars templates, to execute arbitrary code in the javascript system (e.g. browser or server) when the template is compiled with the compat:true option. The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability.
Other sources
The package handlebars before 4.7.7 are vulnerable to Prototype Pollution when selecting certain compiling options to compile templates coming from an untrusted source.
The package handlebars before 4.7.7 are vulnerable to Remote Code Execution (RCE) when using compat compile option to compile templates coming from an untrusted source.
Upstream patch: https://github.com/handlebars-lang/handlebars.js/commit/f0589701698268578199be25285b2ebea1c1e427
— Red Hat
Affected Software
Remediation
Patch Available
Patch Available
Patch Available
Patch Available
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is the vulnerability ID for this issue?
The vulnerability ID for this issue is CVE-2021-23383.
What is the severity level of CVE-2021-23383?
The severity level of CVE-2021-23383 is critical.
What is the affected software for CVE-2021-23383?
The affected software for CVE-2021-23383 includes the package handlebars before version 4.7.7 and Handlebarsjs Handlebars up to version 4.7.7.
How can an attacker exploit this vulnerability?
An attacker can exploit this vulnerability by providing untrusted handlebars templates, allowing them to execute arbitrary code in the javascript system.
Are there any available fixes for CVE-2021-23383?
Yes, the fix for CVE-2021-23383 is to upgrade to version 4.7.7 of the handlebars package.