Track vulnerabilities like this one.
Sign up free to get alerted when software you use is affected.
9.8
Handlebars 4.0‑4.7.8 lets attackers run JavaScript
published 10 days ago
Summary
Versions 4.0.0 through 4.7.8 of the Handlebars template library can run code supplied in a specially crafted object, giving an attacker the ability to execute arbitrary JavaScript on the server. This affects Docker hardened images that include Handlebars, such as the JupyterHub, DataHub ingestion, and Superset images. Upgrade to Handlebars 4.7.9 or later, ensure only string templates are passed to compile, and use the runtime‑only build when possible.
What to do
The CVE record does not list a fixed version. Check the vendor's site or the advisory links below - a fix may already be released.
Affected software
| Ecosystem | Vendor | Product | Affected versions |
|---|---|---|---|
| Docker Hardened Images:Alpine:3.24 | docker hardened images | jupyterhub-k8s-singleuser-sample-fips | All versions |
| Docker Hardened Images:Debian:13 | docker hardened images | datahub-ingestion | All versions |
| Docker Hardened Images:Debian:13 | docker hardened images | jupyterhub-k8s-singleuser-sample-fips | All versions |
| Docker Hardened Images:Debian:13 | docker hardened images | jupyterhub-k8s-singleuser-sample | All versions |
| Docker Hardened Images:Debian:13 | docker hardened images | superset | All versions |
Original advisory text
Handlebars provides the power necessary to let users build semantic templates. In versions 4.0.0 through 4.7.8…
Handlebars provides the power necessary to let users build semantic templates. In versions 4.0.0 through 4.7.8, `Handlebars.compile()` accepts a pre-parsed AST object in addition to a template string. The `value` field of a `NumberLiteral` AST node is emitted directly into the generated JavaScript without quoting or sanitization. An attacker who can supply a crafted AST to `compile()` can therefore inject and execute arbitrary JavaScript, leading to Remote Code Execution on the server. Version 4.7.9 fixes the issue. Some workarounds are available. Validate input type before calling `Handlebars.compile()`; ensure the argument is always a `string`, never a plain object or JSON-deserialized value. Use the Handlebars runtime-only build (`handlebars/runtime`) on the server if templates are pre-compiled at build time; `compile()` will be unavailable.
References
- https://scout.docker.com/v/DHI-7rro-qpep-gm3d-ukbl Vendor Advisory
- https://nvd.nist.gov/vuln/detail/CVE-2026-33937 Vendor Advisory
- https://github.com/handlebars-lang/handlebars.js/security/advisories/GHSA-2w6w-6... Vendor Advisory
- https://github.com/handlebars-lang/handlebars.js/commit/68d8df5a88e0a26fe9e6084c... Patch
- https://github.com/handlebars-lang/handlebars.js/releases/tag/v4.7.9 URL
- https://security-tracker.debian.org/tracker/CVE-2026-33937 Vendor Advisory
- https://github.com/advisories/GHSA-2w6w-674q-4c4q Vendor Advisory
- https://access.redhat.com/security/cve/CVE-2026-33937 Vendor Advisory
- https://www.cve.org/CVERecord?id=CVE-2026-33937 Patch
- https://ubuntu.com/security/CVE-2026-33937 Vendor Advisory
- http://people.ubuntu.com/~ubuntu-security/cve/CVE-2026-33937 Vendor Advisory
Internet-facing
3 days
Internal
60 days
- Not known to be exploited
- Can be exploited automatically (estimated)
- Gives an attacker full control (estimated)
Timeline
Published12 Nov 2026
Updated16 Nov 2026
First seen16 Nov 2026
Sources
DHI-7rro-qpep-gm3d-ukbl · OSV
Track software like this
Free during beta