DEBIAN-CVE-2026-33941
Handlebars provides the power necessary to let users build semantic templates. In versions 4.0.0 through 4.7.8, the Handlebars CLI precompiler (`bin/handlebars` / `lib/precompiler.js`) concatenates user-controlled strings — template file names and several CLI options — directly into the JavaScript it emits, without any escaping or sanitization. An attacker who can influence template filenames or CLI arguments can inject arbitrary JavaScript that executes when the generated bundle is loaded in Node.js or a browser. Version 4.7.9 fixes the issue. Some workarounds are available. First, validate all CLI inputs before invoking the precompiler. Reject filenames and option values that contain characters with JavaScript string-escaping significance (`"`, `'`, `;`, etc.). Second, use a fixed, trusted namespace string passed via a configuration file rather than command-line arguments in automated pipelines. Third, run the precompiler in a sandboxed environment (container with no write access to sensitive paths) to limit the impact of successful exploitation. Fourth, audit template filenames in any repository or package that is consumed by an automated build pipeline.
DEBIAN-CVE-2026-33941
Primary source · Revision 1
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: osv:DEBIAN-CVE-2026-33941
node-handlebars
Source reference: /affected/0/package/name
- Affected versions
- 3:4.7.7+~4.1.0-1
Source reference:
/affected/0/versions3:4.7.9-1Source reference:
/affected/0/versions3:4.7.9-2Source reference:
/affected/0/versions3:4.7.9-3Source reference:
/affected/0/versions3:4.7.9-4Source reference:
/affected/0/versions3:4.7.9-5Source reference:
/affected/0/versions3:4.7.9-6Source reference:
/affected/0/versions - Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
node-handlebars
Source reference: /affected/1/package/name
- Affected versions
- 3:4.7.7+~4.1.0-1
Source reference:
/affected/1/versions3:4.7.9-1Source reference:
/affected/1/versions3:4.7.9-2Source reference:
/affected/1/versions3:4.7.9-3Source reference:
/affected/1/versions3:4.7.9-4Source reference:
/affected/1/versions3:4.7.9-5Source reference:
/affected/1/versions3:4.7.9-6Source reference:
/affected/1/versions - Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
node-handlebars
Source reference: /affected/2/package/name
- Affected versions
- 3:4.7.7+~4.1.0-1
Source reference:
/affected/2/versions - Fixed versions
- 3:4.7.9-1
Source reference:
/affected/2/ranges - Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "node-handlebars",
"purl": "pkg:deb/debian/node-handlebars?arch=source&distro=bookworm",
"ecosystem": "Debian:12"
},
"versions": [
"3:4.7.7+~4.1.0-1",
"3:4.7.9-1",
"3:4.7.9-2",
"3:4.7.9-3",
"3:4.7.9-4",
"3:4.7.9-5",
"3:4.7.9-6"
],
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-33941.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "node-handlebars",
"purl": "pkg:deb/debian/node-handlebars?arch=source&distro=trixie",
"ecosystem": "Debian:13"
},
"versions": [
"3:4.7.7+~4.1.0-1",
"3:4.7.9-1",
"3:4.7.9-2",
"3:4.7.9-3",
"3:4.7.9-4",
"3:4.7.9-5",
"3:4.7.9-6"
],
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-33941.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "3:4.7.9-1"
}
]
}
],
"package": {
"name": "node-handlebars",
"purl": "pkg:deb/debian/node-handlebars?arch=source&distro=forky",
"ecosystem": "Debian:14"
},
"versions": [
"3:4.7.7+~4.1.0-1"
],
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-33941.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
}
]Publisher severity
No explicit severity was provided.
- Event
- #56797 · Revision 1
- Added to Heist Feed
- Publisher date