Handlebars up to 4.7.8 lib/precompiler.js cross site scripting

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
5.4$0-$5k0.16

Summaryinfo

A vulnerability, which was classified as problematic, was found in Handlebars up to 4.7.8. The impacted element is an unknown function in the library lib/precompiler.js. Such manipulation leads to cross site scripting. This vulnerability is referenced as CVE-2026-33941. The attack can only be performed from a local environment. No exploit is available. You should upgrade the affected component.

Detailsinfo

A vulnerability was found in Handlebars up to 4.7.8 and classified as problematic. Affected by this issue is some unknown functionality in the library lib/precompiler.js. The manipulation with an unknown input leads to a cross site scripting vulnerability. Using CWE to declare the problem leads to CWE-79. The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. Impacted is integrity. CVE summarizes:

Handlebars provides the power necessary to let users build semantic templates. In versions 4.0.0 through 4.7.8, the Handlebars CLI precompiler (`bin/handlebars` / `lib/precompiler.js`) concatenates user-controlled strings — template file names and several CLI options — directly into the JavaScript it emits, without any escaping or sanitization. An attacker who can influence template filenames or CLI arguments can inject arbitrary JavaScript that executes when the generated bundle is loaded in Node.js or a browser. Version 4.7.9 fixes the issue. Some workarounds are available. First, validate all CLI inputs before invoking the precompiler. Reject filenames and option values that contain characters with JavaScript string-escaping significance (`"`, `'`, `;`, etc.). Second, use a fixed, trusted namespace string passed via a configuration file rather than command-line arguments in automated pipelines. Third, run the precompiler in a sandboxed environment (container with no write access to sensitive paths) to limit the impact of successful exploitation. Fourth, audit template filenames in any repository or package that is consumed by an automated build pipeline.

The advisory is shared for download at github.com. This vulnerability is handled as CVE-2026-33941 since 03/24/2026. The exploitation is known to be easy. The attack needs to be approached locally. Successful exploitation requires user interaction by the victim. There are known technical details, but no exploit is available. The MITRE ATT&CK project declares the attack technique as T1059.007.

The vulnerability scanner Nessus provides a plugin with the ID 304160 (Linux Distros Unpatched Vulnerability : CVE-2026-33941), which helps to determine the existence of the flaw in a target environment.

Upgrading to version 4.7.9 eliminates this vulnerability. The upgrade is hosted for download at github.com. Applying the patch 68d8df5a88e0a26fe9e6084c5c6aaebe67b07da2 is able to eliminate this problem. The bugfix is ready for download at github.com. The best possible mitigation is suggested to be upgrading to the latest version.

The vulnerability is also documented in the vulnerability database at Tenable (304160). If you want to get best quality of vulnerability data, you may have to visit VulDB.

Productinfo

Name

Version

License

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔒
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 5.5
VulDB Meta Temp Score: 5.4

VulDB Base Score: 2.8
VulDB Temp Score: 2.7
VulDB Vector: 🔒
VulDB Reliability: 🔍

CNA Base Score: 8.2
CNA Vector (GitHub_M): 🔒

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍

Exploitinginfo

Class: Cross site scripting
CWE: CWE-79 / CWE-94 / CWE-74
CAPEC: 🔒
ATT&CK: 🔒

Physical: Partially
Local: Yes
Remote: Partially

Availability: 🔒
Status: Not defined

EPSS Score: 🔒
EPSS Percentile: 🔒

Price Prediction: 🔍
Current Price Estimation: 🔒

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Nessus ID: 304160
Nessus Name: Linux Distros Unpatched Vulnerability : CVE-2026-33941

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

0-Day Time: 🔒

Upgrade: Handlebars 4.7.9
Patch: 68d8df5a88e0a26fe9e6084c5c6aaebe67b07da2

Timelineinfo

03/24/2026 CVE reserved
03/27/2026 +3 days Advisory disclosed
03/27/2026 +0 days VulDB entry created
03/28/2026 +1 days VulDB entry last update

Sourcesinfo

Advisory: GHSA-xjpj-3mr7-gcpf
Status: Confirmed

CVE: CVE-2026-33941 (🔒)
GCVE (CVE): GCVE-0-2026-33941
GCVE (VulDB): GCVE-100-354020

Entryinfo

Created: 03/27/2026 23:41
Updated: 03/28/2026 23:31
Changes: 03/27/2026 23:41 (67), 03/28/2026 23:31 (2)
Complete: 🔍
Cache ID: 216:7A4:103

Discussion

No comments yet. Languages: en.

Please log in to comment.

Do you know our Splunk app?

Download it now for free!