Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1336 CNY

100%

CVE-2026-16231— hbs vulnerable to XSS via registerAsyncHelper output-escaping bypass

Quick assessment

Affected
hbs hbs
Exploitation
Public or AI PoC available; prioritize validation
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

hbs 是一个封装了 Handlebars 的 Express 视图引擎。其 API 绕过了 Handlebars 的自动 HTML 转义机制:在第一次渲染过程中,异步助手(async helper)会返回一个不透明的占位符;此时双大括号表达式( )仅对该占位符进行转义。随后,在渲染阶段,hbs 会将该占位符替换为回调函数的原始返回值,且不进行任何转义。此行为存在于缓存渲染、非缓存渲染以及布局渲染等所有渲染路径中。 如果应用程序将攻击者可影响的数据(例如,来自数据库的用户提交内容)传入异步助手的回调函数,则可能导致

CVSS 8.1 · High

Possible ATT&CK Techniques 1 AI

T1059 · Command and Scripting Interpreter
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-16231

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
hbs vulnerable to XSS via registerAsyncHelper output-escaping bypass
Source: CVE Program / CVE List V5
Vulnerability Description
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.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
Source: CVE Program / CVE List V5
Vulnerability Type
在Web页面生成时对输入的转义处理不恰当(跨站脚本)
Source: CVE Program / CVE List V5

Affected Products

Vendor Product Affected Versions CPE Subscribe
hbs hbs 2.1.0 ~ 4.3.0 -

II. Public POCs for CVE-2026-16231

# POC Description Source Link Shenlong Link
AI-Generated POC Premium
Qwen3.6-35B-A3B · 6445 chars
Pro+ exclusive includes:
Vulnerability reproduction recording (real sandbox build + trigger, exclusive)
In-depth vulnerability mechanism
Trigger conditions & impact
Full executable POC code
Exploit chain & mitigation
POC zip download
100+ AI POC generations per month

III. Intelligence Information for CVE-2026-16231

登录查看更多情报信息。

Vendor Advisories for CVE-2026-16231 (1)

IV. Related Vulnerabilities

V. Comments for CVE-2026-16231

No comments yet


Leave a comment