CVE-2026-16231

Source
https://cve.org/CVERecord?id=CVE-2026-16231
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-16231.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-16231
Aliases
  • GHSA-rg36-rxv9-2m9q
Published
2026-08-25T10:00:09Z
Modified
2026-09-02T03:47:25Z
Severity
  • 8.1 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N CVSS Calculator
Summary
hbs vulnerable to XSS via registerAsyncHelper output-escaping bypass
Details

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.

Database specific
{
    "cna_assigner": "openjs",
    "cwe_ids": [
        "CWE-79"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/16xxx/CVE-2026-16231.json"
}
References

Affected packages

Git / github.com/pillarjs/hbs

Affected ranges

Type
GIT
Repo
https://github.com/pillarjs/hbs
Events
Database specific
Show details
{
    "cpe": "cpe:2.3:a:hbs_project:hbs:*:*:*:*:*:node.js:*:*",
    "extracted_events": [
        {
            "introduced": "2.1.0"
        },
        {
            "fixed": "4.3.0"
        }
    ],
    "source": [
        "AFFECTED_FIELD",
        "CPE_RANGE"
    ]
}

Affected versions

v2.*
v2.1.0
v2.3.0
v2.3.1
v2.4.0
v2.5.0
v2.6.0
v2.7.0
v2.8.0
v2.9.0
v3.*
v3.0.0
v3.0.1
v3.1.0
v3.1.1
v4.*
v4.0.0
v4.0.1
v4.0.2
v4.0.3
v4.0.4
v4.0.5
v4.0.6
v4.1.0
v4.1.1
v4.1.2
v4.2.0
v4.2.1

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-16231.json"