{
  "id": "CVE-2026-33939",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-33939",
  "published_at": "2026-03-27T21:08:24.664Z",
  "title": "Handlebars.js has Denial of Service via Malformed Decorator Syntax in Template Compilation",
  "vendor": "handlebars-lang",
  "product": "handlebars.js",
  "cvss": {
    "score": 7.5,
    "source": "cna",
    "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "Handlebars provides the power necessary to let users build semantic templates. In versions 4.0.0 through 4.7.8, when a Handlebars template contains decorator syntax referencing an unregistered decorator (e.g. `{{*n}}`), the compiled template calls `lookupProperty(decorators, \"n\")`, which returns `undefined`. The runtime then immediately invokes the result as a function, causing an unhandled `TypeError: ... is not a function` that crashes the Node.js process. Any application that compiles user-supplied templates without wrapping the call in a `try/catch` is vulnerable to a single-request Denial of Service. Version 4.7.9 fixes the issue. Some workarounds are available. Wrap compilation and rendering in `try/catch`. Validate template input before passing it to `compile()`; reject templates containing  decorator syntax (`{{*...}}`) if decorators are not used in your application. Use the pre-compilation workflow; compile templates at build time and serve only pre-compiled  templates; do not call `compile()` at request time.",
  "cwe": "CWE-754",
  "cpes": [
    "cpe:2.3:a:handlebarsjs:handlebars:*:*:*:*:*:node.js:*:*"
  ],
  "cvss_by_source": {
    "cna": 7.5
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "handlebars-lang",
        "product": "handlebars.js",
        "ranges": [
          "\u003e= 4.0.0, \u003c 4.7.9"
        ],
        "fixed_in": [
          "4.7.9"
        ]
      }
    ],
    "upgrade": [
      "Upgrade handlebars.js to 4.7.9 or later."
    ],
    "references": [
      {
        "kind": "Vendor advisory",
        "url": "https://github.com/handlebars-lang/handlebars.js/security/advisories/GHSA-9cx6-37pm-9jff"
      },
      {
        "kind": "Patch",
        "url": "https://github.com/handlebars-lang/handlebars.js/commit/68d8df5a88e0a26fe9e6084c5c6aaebe67b07da2"
      },
      {
        "kind": "Release notes",
        "url": "https://github.com/handlebars-lang/handlebars.js/releases/tag/v4.7.9"
      }
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
