Handlebars up to 4.7.8 env.compile code injection

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.
6.7$0-$5k0.00

Summaryinfo

A vulnerability was found in Handlebars up to 4.7.8. It has been classified as critical. The impacted element is the function env.compile. Performing a manipulation results in code injection. This vulnerability is cataloged as CVE-2026-33940. It is possible to initiate the attack remotely. There is no exploit available. Upgrading the affected component is recommended.

Detailsinfo

A vulnerability, which was classified as critical, was found in Handlebars up to 4.7.8. This affects the function env.compile. The manipulation with an unknown input leads to a code injection vulnerability. CWE is classifying the issue as CWE-94. The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. This is going to have an impact on confidentiality, integrity, and availability. The summary by CVE is:

Handlebars provides the power necessary to let users build semantic templates. In versions 4.0.0 through 4.7.8, a crafted object placed in the template context can bypass all conditional guards in `resolvePartial()` and cause `invokePartial()` to return `undefined`. The Handlebars runtime then treats the unresolved partial as a source that needs to be compiled, passing the crafted object to `env.compile()`. Because the object is a valid Handlebars AST containing injected code, the generated JavaScript executes arbitrary commands on the server. The attack requires the adversary to control a value that can be returned by a dynamic partial lookup. Version 4.7.9 fixes the issue. Some workarounds are available. First, use the runtime-only build (`require('handlebars/runtime')`). Without `compile()`, the fallback compilation path in `invokePartial` is unreachable. Second, sanitize context data before rendering: Ensure no value in the context is a non-primitive object that could be passed to a dynamic partial. Third, avoid dynamic partial lookups (`{{> (lookup ...)}}`) when context data is user-controlled.

The advisory is shared at github.com. This vulnerability is uniquely identified as CVE-2026-33940 since 03/24/2026. The exploitability is told to be difficult. It is possible to initiate the attack remotely. No form of authentication is needed for exploitation. Technical details are known, but no exploit is available. MITRE ATT&CK project uses the attack technique T1059 for this issue.

The vulnerability scanner Nessus provides a plugin with the ID 304164 (Linux Distros Unpatched Vulnerability : CVE-2026-33940), 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 databases at Tenable (304164) and CERT Bund (WID-SEC-2026-1434). Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Affected

  • IBM App Connect Enterprise

Productinfo

Name

Version

License

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔒
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 6.8
VulDB Meta Temp Score: 6.7

VulDB Base Score: 5.6
VulDB Temp Score: 5.4
VulDB Vector: 🔒
VulDB Reliability: 🔍

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

CVSSv2info

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

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

Exploitinginfo

Class: Code injection
CWE: CWE-94 / CWE-74 / CWE-707
CAPEC: 🔒
ATT&CK: 🔒

Physical: No
Local: No
Remote: Yes

Availability: 🔒
Status: Not defined

EPSS Score: 🔒
EPSS Percentile: 🔒

Price Prediction: 🔍
Current Price Estimation: 🔒

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Nessus ID: 304164
Nessus Name: Linux Distros Unpatched Vulnerability : CVE-2026-33940

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
05/09/2026 +43 days VulDB entry last update

Sourcesinfo

Advisory: GHSA-xhpv-hc6g-r9c6
Status: Confirmed

CVE: CVE-2026-33940 (🔒)
GCVE (CVE): GCVE-0-2026-33940
GCVE (VulDB): GCVE-100-354009
CERT Bund: WID-SEC-2026-1434 - IBM App Connect Enterprise Certified Container: Mehrere Schwachstellen

Entryinfo

Created: 03/27/2026 23:38
Updated: 05/09/2026 04:49
Changes: 03/27/2026 23:38 (67), 03/28/2026 23:31 (2), 05/09/2026 04:49 (7)
Complete: 🔍
Cache ID: 216::103

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Do you need the next level of professionalism?

Upgrade your account now!