Uncaught Exception Affecting hbs package, versions >=4.3.0 <4.3.1


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.26% (18th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Uncaught Exception vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-HBS-19784397
  • published14 Sept 2026
  • disclosed11 Sept 2026
  • creditAlfredo González

Introduced: 11 Sep 2026

NewCVE-2026-87123  (opens in a new tab)
CWE-248  (opens in a new tab)

How to fix?

Upgrade hbs to version 4.3.1 or higher.

Overview

hbs is an Express.js template engine plugin for Handlebars

Affected versions of this package are vulnerable to Uncaught Exception in its async helper output escaping, where a helper value carrying a truthy but non-callable toHTML property causes handlebars' escapeExpression to invoke it as a method and throw a TypeError. An attacker can crash the Node.js process by supplying a value such as {"toHTML":"x"} that reaches an async helper, since the TypeError is thrown asynchronously outside the render function's try-catch and no Express error handler can intercept it. This affects only 4.3.0 and requires the application to register helpers with registerAsyncHelper and pass externally influenced or parsed values into them.

CVSS Base Scores

version 4.0
version 3.1