VDB

DEBIAN-CVE-2026-33941

DEBIAN-CVE-2026-33941 PUBLISHED CVSS 8.199999809265137 HIGH

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.

Risk Scores

CVSS 3.1
8.199999809265137
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H

Affected Products

VendorProductVersions
Debian:11node-handlebars0, 4.7.9-5, 4.7.9-4
Debian:13node-handlebars4.7.9-5, 3:4.7.7+~4.1.0-1, 3:4.7.9-1
Debian:14node-handlebars0, 0, 3:4.7.7+~4.1.0-1
Debian:12node-handlebars3:4.7.7+~4.1.0-1, 4.7.9-5, 4.7.9-4

Exploit Intelligence

Timeline

  • Mar 27, 2026 CVE Published
  • Apr 28, 2026 CVE Updated
Open in Interactive Console →
$ Console Community · 100/wk Open console ›