CVE-2026-16231CWE-79cross-site-scripting

CVE-2026-16231

High · published August 25, 2026

CVSS v3.1
8.1
EPSS
0%
Percentile
12.7
In the wild
Unconfirmed
What it is

hbs is an Express view engine that wraps Handlebars. Its registerAsyncHelper API bypasses Handlebars' automatic HTML escaping: an async helper returns an opaque placeholder during the first render pass, so the double-brace expression escapes only the placeholder, and after rendering hbs substitutes the placeholder with the raw callback return value without escaping it, across the cached, uncached, and layout render paths. An application that passes attacker-influenced data, for example user-supplied content from a database, into an async helper callback can therefore have arbitrary HTML and JavaScript injected into the server-rendered page, resulting in stored or reflected cross-site scripting. Versions 2.1.0 through 4.2.1 are affected, and the issue is fixed in 4.3.0, which HTML-escapes async helper output. Applications that intentionally emit raw HTML from an async helper can opt in explicitly with hbs.SafeString. Users should upgrade to 4.3.0.

The record
Technical detail
CVSS v3.1
8.1 · HIGH
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
CVSS v4.0
Not supplied
EPSS
0.00227 · 12.7th percentile
Weakness
CWE-79 · Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Published
2026-08-25T14:18Z
Affected products (1)
ProductVersionsFixed in
hbs_project/hbs≥ 2.1.0, < 4.3.04.3.0
References (2)
EPSS history
Timeline
  • 27 AUG 06:19Z
    EPSS moved — → 0%
    epss
  • 25 AUG 10:00Z
    hbs vulnerable to XSS via registerAsyncHelper output-escaping bypass
    cvelistv5