CVE catalog

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 us

[CVE catalog]

Severity
High · CVSS 8.2CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H
Published
Source
[NVD] · [CVE record]
EPSS
0.30% · Oct 25, 2026

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.

Vulnerable and fixed packages

Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.

DistributionPackageReleaseVersionStatus
Debiannode-handlebarssid3:4.7.10-1fixed
Debiannode-handlebarsforky3:4.7.10-1fixed
Debiannode-handlebarstrixie3:4.7.7+~4.1.0-1vulnerable
Debiannode-handlebarsbookworm3:4.7.7+~4.1.0-1vulnerable
Cpenode-handlebarsNot reportedNot reportedvulnerable
CpehandlebarsNot reported4.7.9fixed
CpehandlebarsNot reported4.7.9fixed

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
Debiannode-handlebarssourcesid3:4.7.9-1not yet assignedNot reported[1132141]
Debiannode-handlebarssourceforky3:4.7.9-1not yet assignedNot reported[1132141]
Debiannode-handlebarssourcetrixie(unfixed)not yet assignedNot reported[1132141]
Debiannode-handlebarssourcebookworm(unfixed)not yet assignedNot reported[1132141]
CpehandlebarscpeNot reported4.7.9Not reportedNot reportedNot reported
CpehandlebarscpeNot reported4.7.9Not reportedNVD-CVE-2026-33941Not reported

[Debian bug #1132141]

Notes

[trixie] node-handlebars: Minor issue [bookworm] node-handlebars: Minor issue

OpenFactory catalog packages

[Debian 12 (Bookworm)]

  • [handlebars]Affected

    Source package: [node-handlebars]

    Details (2)
    • 3:4.7.7+~4.1.0-1 · all · bookworm

      Affected

      nvd · node-handlebars · debian · bookworm; nvd · node-handlebars · debian · 12

    • 3:4.7.7+~4.1.0-1 · all · bookworm

      Affected

      nvd · node-handlebars · debian · bookworm; nvd · node-handlebars · debian · 12

  • Source package: [node-handlebars]

    Details (2)
    • 3:4.7.7+~4.1.0-1 · all · bookworm

      Affected

      nvd · node-handlebars · debian · bookworm; nvd · node-handlebars · debian · 12

    • 3:4.7.7+~4.1.0-1 · all · bookworm

      Affected

      nvd · node-handlebars · debian · bookworm; nvd · node-handlebars · debian · 12

  • Source package: [node-handlebars]

    Details (2)
    • 3:4.7.7+~4.1.0-1 · all · bookworm

      Affected

      nvd · node-handlebars · debian · bookworm; nvd · node-handlebars · debian · 12

    • 3:4.7.7+~4.1.0-1 · all · bookworm

      Affected

      nvd · node-handlebars · debian · bookworm; nvd · node-handlebars · debian · 12

[Debian 13 (Trixie)]

  • [handlebars]Affected

    Source package: [node-handlebars]

    Details (2)
    • 3:4.7.7+~4.1.0-1 · all · trixie

      Affected

      nvd · node-handlebars · debian · 13

    • 3:4.7.7+~4.1.0-1 · all · trixie

      Affected

      nvd · node-handlebars · debian · 13

  • Source package: [node-handlebars]

    Details (2)
    • 3:4.7.7+~4.1.0-1 · all · trixie

      Affected

      nvd · node-handlebars · debian · 13

    • 3:4.7.7+~4.1.0-1 · all · trixie

      Affected

      nvd · node-handlebars · debian · 13

  • Source package: [node-handlebars]

    Details (2)
    • 3:4.7.7+~4.1.0-1 · all · trixie

      Affected

      nvd · node-handlebars · debian · 13

    • 3:4.7.7+~4.1.0-1 · all · trixie

      Affected

      nvd · node-handlebars · debian · 13

Observed:

References