CVE-2021-23369

MEDIUM

handlebars < 4.7.7 - Remote Code Execution via Untrusted Template Compilation

Title source: llm
STIX 2.1

Exploitation Summary

EIP tracks 2 public exploits for CVE-2021-23369. PoCs published by fazilbaig1, dinhvaren.

AI-analyzed exploit summary This repository contains a functional exploit for CVE-2021-23369, a Remote Code Execution (RCE) vulnerability in Handlebars versions before 4.7.7. The exploit leverages a malicious template payload to achieve arbitrary code execution, while the scanner checks for Handlebars usage in the target.

Description

The package handlebars before 4.7.7 are vulnerable to Remote Code Execution (RCE) when selecting certain compiling options to compile templates coming from an untrusted source.

Exploits (2)

nomisec WORKING POC 1 stars
by fazilbaig1 · poc
https://github.com/fazilbaig1/CVE-2021-23369

This repository contains a functional exploit for CVE-2021-23369, a Remote Code Execution (RCE) vulnerability in Handlebars versions before 4.7.7. The exploit leverages a malicious template payload to achieve arbitrary code execution, while the scanner checks for Handlebars usage in the target.

Classification
Working Poc 90%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: Handlebars < 4.7.7
No auth needed
Prerequisites: Target must be running a vulnerable version of Handlebars · Target must process untrusted templates
devstral-2 · analyzed Feb 18, 2026 Full analysis →
nomisec WORKING POC
by dinhvaren · poc
https://github.com/dinhvaren/cve-2021-23369

This repository contains a functional PoC for CVE-2021-23369, a template injection vulnerability in Handlebars. The server.js file demonstrates a vulnerable Handlebars compilation endpoint that allows arbitrary code execution via crafted templates.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Handlebars.js (versions affected by CVE-2021-23369)
No auth needed
Prerequisites: Network access to the vulnerable endpoint · Ability to send crafted HTTP POST requests
devstral-2 · analyzed Apr 10, 2026 Full analysis →

References (7)

Core 7
Core References
Exploit, Third Party Advisory x_refsource_misc
https://snyk.io/vuln/SNYK-JS-HANDLEBARS-1056767
Exploit, Third Party Advisory x_refsource_misc
https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARS-1074950
Exploit, Third Party Advisory x_refsource_misc
https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSBOWER-1074951
Exploit, Third Party Advisory x_refsource_misc
https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-1074952
Third Party Advisory x_refsource_confirm
https://security.netapp.com/advisory/ntap-20210604-0008/

Scores

CVSS v3 5.6
EPSS 0.0358
EPSS Percentile 88.1%
Attack Vector NETWORK
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L

Details

Status published
Products (5)
handlebarsjs/handlebars < 4.7.7
npm/handlebars 0 - 4.7.7npm
org.webjars/handlebars 0 - 4.7.7Maven
org.webjars.bowergithub.wycats/handlebars.js 0 - 4.7.7Maven
org.webjars.npm/handlebars 0 - 4.7.7Maven
Published Apr 12, 2021
Tracked Since Feb 18, 2026