CVE Database›Document archive›CVE-2021-23383

CVE-2021-23383

nodejs-handlebars: Remote code execution when compiling untrusted compile templates with compat:true option

Loading…

Severity

Moderate

Red Hat Product Security

9.8

CVSS 3.1

Review impact separately from score.

Published · April 12, 2021

Updated · November 1, 2026

Description

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.

Statement

Red Hat OpenShift Container Platform (OCP) 4 delivers the kibana component which includes Handlebars.js. Starting in 4.6, kibana is shipping as "container first" content. As such, the fix for OCP will be seen in the affected products table under openshift4/ose-logging-kibana6. The separate package "kibana" listed under "OpenShift Container Platform 4" is only used by 4.5 and earlier and will not be fixed.

In OpenShift Container Platform (OCP) and OpenShift ServiceMesh (OSSM) some components include the vulnerable handlebars library, but access is protected by OpenShift OAuth what reducing impact by this flaw to LOW.

Red Hat Quay includes Handlebars.js as a development dependency. It does not use Handlebars.js at runtime to process templates so have been given a low impact rating.

Red Hat Gluster Storage 3 bundles vulnerable Handlebars.js (with pcs), however it does not use "compat" option and templates from external sources, hence this issue has been rated as having a security impact of Low.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

No mitigation is specified in collected source.

CVSS / CWE

CVSS 3.1 · 9.8
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

CWE-94 · Improper Control of Generation of Code