p PatchFirst

CVE-2026-33940

CVE-2026-33940 · Handlebars.js has JavaScript Injection via AST Type Confusion when passing an object as dynamic partial

Diese Seite enthält Fakten aus öffentlichen Sicherheitsquellen. Lesen Sie vor dem Aktualisieren die Originalmeldung.

Handlebars provides the power necessary to let users build semantic templates. In versions 4.0.0 through 4.7.8, a crafted object placed in the template context can bypass all conditional guards in `resolvePartial()` and cause `invokePartial()` to return `undefined`. The Handlebars runtime then treats the unresolved partial as a source that needs to be compiled, passing the crafted object to `env.compile()`. Because the object is a valid Handlebars AST containing injected code, the generated JavaScript executes arbitrary commands on the server. The attack requires the adversary to control a value that can be returned by a dynamic partial lookup. Version 4.7.9 fixes the issue. Some workarounds are available. First, use the runtime-only build (`require('handlebars/runtime')`). Without `compile()`, the fallback compilation path in `invokePartial` is unreachable. Second, sanitize context data before rendering: Ensure no value in the context is a non-primitive object that could be passed to a dynamic partial. Third, avoid dynamic partial lookups (`{{> (lookup ...)}}`) when context data is user-controlled.

CVSS 8.1 · Hoch · EPSS 0,7% · Korrektur verfügbar

Veröffentlicht
Aktualisiert

Technologie-Stack: system · node

Betroffene Produkte und Versionen

  • handlebars.js

    Softwareversionen
    • >= 4.0.0, < 4.7.9: Betroffen

    Keine Korrektur veröffentlicht

  • node-handlebars Debian:12

    Softwareversionen
    • 3:4.7.10-1
    • 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
    Betroffene Versionsbereiche
    • ECOSYSTEM: (−∞, +∞)

    Keine Korrektur veröffentlicht

  • node-handlebars Debian:13

    Softwareversionen
    • 3:4.7.10-1
    • 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
    Betroffene Versionsbereiche
    • ECOSYSTEM: (−∞, +∞)

    Keine Korrektur veröffentlicht

  • node-handlebars Debian:14

    Softwareversionen
    • 3:4.7.7+~4.1.0-1
    Betroffene Versionsbereiche
    • ECOSYSTEM: < 3:4.7.9-1

    Auf 3:4.7.9-1 aktualisieren

  • handlebars npm

    Betroffene Versionsbereiche
    • SEMVER: ≥ 4.0.0, < 4.7.9

    Auf 4.7.9 aktualisieren

  • node-handlebars Ubuntu:18.04:LTS

    Softwareversionen
    • 3:4.0.10-5
    Betroffene Versionsbereiche
    • ECOSYSTEM: (−∞, +∞)

    Keine Korrektur veröffentlicht

  • node-handlebars Ubuntu:20.04:LTS

    Softwareversionen
    • 3:4.1.0-1
    • 3:4.5.3-1
    • 3:4.7.2-1
    Betroffene Versionsbereiche
    • ECOSYSTEM: (−∞, +∞)

    Keine Korrektur veröffentlicht

  • node-handlebars Ubuntu:22.04:LTS

    Softwareversionen
    • 3:4.7.6+~4.1.0-2
    • 3:4.7.7+~4.1.0-1
    Betroffene Versionsbereiche
    • ECOSYSTEM: (−∞, +∞)

    Keine Korrektur veröffentlicht

  • node-handlebars Ubuntu:24.04:LTS

    Softwareversionen
    • 3:4.7.7+~4.1.0-1
    Betroffene Versionsbereiche
    • ECOSYSTEM: (−∞, +∞)

    Keine Korrektur veröffentlicht

  • node-handlebars Ubuntu:25.10

    Softwareversionen
    • 3:4.7.7+~4.1.0-1
    Betroffene Versionsbereiche
    • ECOSYSTEM: (−∞, +∞)

    Keine Korrektur veröffentlicht

  • node-handlebars Ubuntu:26.10

    Softwareversionen
    • 3:4.7.7+~4.1.0-1
    • 3:4.7.9-5
    Betroffene Versionsbereiche
    • ECOSYSTEM: (−∞, +∞)

    Keine Korrektur veröffentlicht

  • node-handlebars Ubuntu:26.04:LTS

    Softwareversionen
    • 3:4.7.7+~4.1.0-1
    Betroffene Versionsbereiche
    • ECOSYSTEM: (−∞, +∞)

    Keine Korrektur veröffentlicht

Originalquellen

Prüfen Sie Ihren Server →