CVE-2026-106445: Handlebars JavaScript Injection Vulnerability Leading to Remote Code Execution

handlebars Updated 08 Oct 2026

Summary

08/10/2026
Yes i
Critical
9.2

CVE-2026-106445: Handlebars: JavaScript Injection via Own Property Check Bypass. Affects handlebars versions >= 4.0.0, < 4.7.10. Fixed in 4.7.10. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Handlebars is a popular templating engine for JavaScript that allows developers to create dynamic HTML content. It is widely used in web applications to separate HTML generation from the application logic. The library provides features such as helpers, partials, and the ability to create reusable templates. However, a critical vulnerability has been identified that can lead to remote code execution if certain configurations are used.

Vulnerability Detail

The vulnerability arises from Handlebars' handling of the Function constructor when templates reach Function.prototype. The lookupProperty function trusts own properties, allowing an attacker to bypass the deny list that is meant to block access to dangerous methods like constructor. This can lead to the execution of arbitrary JavaScript code on the server, resulting in remote code execution. The vulnerability is particularly dangerous when allowProtoMethodsByDefault is set to true, as it allows attackers to exploit the prototype chain to access the Function constructor and execute malicious code.

How To Fix

Latest published version: 4.7.10 as of 22 Oct 2026

npm install handlebars@4.7.10

The newest release already contains this fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If you cannot update Handlebars immediately, avoid setting allowProtoMethodsByDefault: true when compiling templates with untrusted data. This will help mitigate the risk of exploitation until you can apply the patch.

Conclusion

The Handlebars vulnerability CVE-2026-106445 poses a significant risk to applications using this templating engine, especially when certain configurations are enabled. It is crucial to update to the patched version or implement workarounds to mitigate the risk of exploitation.

See every vulnerability recorded for handlebars →

Share this vulnerability

FAQ

CVE-2026-106445 is a critical vulnerability in the Handlebars templating engine that allows for JavaScript injection and remote code execution.

You can check if your application is affected by using Vulert, which monitors open-source vulnerabilities in your software. Visit Vulert Scanner to use the Vulert playground without signup.

The CVSS score of this vulnerability is 9.2, indicating a critical level of severity.

As a temporary measure, do not set allowProtoMethodsByDefault: true when compiling templates with untrusted data to reduce the risk of exploitation.

If exploited, this vulnerability can allow an attacker to execute arbitrary JavaScript code on the server, potentially leading to data breaches or complete server compromise.

Related vulnerabilities

Recent vulnerabilities recorded for handlebars.

How To Fix

Latest published version: 4.7.10 as of 22 Oct 2026

npm install handlebars@4.7.10

The newest release already contains this fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback