{"id":"CVE-2026-16231","published":"2026-08-25T10:00:09Z","modified":"2026-08-25T19:47:42Z","title":"hbs vulnerable to XSS via registerAsyncHelper output-escaping bypass","vendor":"hbs","product":"hbs","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.1,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00402,"percentile":0.3538,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/pillarjs/hbs/security/advisories/GHSA-rg36-rxv9-2m9q","tags":[]},{"url":"https://cna.openjsf.org/security-advisories.html","tags":[]}],"priority":{"score":12.7,"factors":[{"name":"EPSS percentile","points":7.08},{"name":"CVSS severity","points":5.67}]},"vendorSlug":"hbs","affectedVersions":[{"vendor":"hbs","product":"hbs","versions":[">= 2.1.0, < 4.3.0"]}],"fixedVersions":[{"vendor":"hbs","product":"hbs","versions":["4.3.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-08-25T19:47:24.248925Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2026-65392","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-hbs-cve-2026-16231","children":[{"from":"CVE-2026-16231","to":"CVE-2026-87123","relation":"regression","confidence":"high","kind":"lineage","evidence":[{"kind":"text","provenance":"source","relation":"regression","quote":"Only version 4.3.0 is affected, since the throwing escape was introduced by the fix for CVE-2026-16231 and earlier versions do not escape async helper values.","from":"CVE.org","in":"CVE-2026-87123"}]}]}}