{
  "cveId": "CVE-2026-33940",
  "url": "https://patchblox.com/security/cve/CVE-2026-33940",
  "summary": "CVE-2026-33940 is fixed in node-handlebars on 1 platform by DEBIAN-CVE-2026-33940 (version 3:4.7.9-1), released March 27, 2026. It is not reported as exploited. Patch Radar priority: High.",
  "title": "Handlebars.js has JavaScript Injection via AST Type Confusion when passing an object as dynamic partial",
  "description": "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 \u0060resolvePartial()\u0060 and cause \u0060invokePartial()\u0060 to return \u0060undefined\u0060. The Handlebars runtime then treats the unresolved partial as a source that needs to be compiled, passing the crafted object to \u0060env.compile()\u0060. 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 (\u0060require(\u0027handlebars/runtime\u0027)\u0060). Without \u0060compile()\u0060,  the fallback compilation path in \u0060invokePartial\u0060 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 (\u0060{{\u003E (lookup ...)}}\u0060) when context data is user-controlled.",
  "published": "2026-03-27T22:16:21Z",
  "severity": "Important",
  "cvss": 8.1,
  "cvssVector": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H",
  "cwe": "Improper Control of Generation of Code (\u0027Code Injection\u0027)",
  "epss": 0.00715,
  "epssPercentile": 0.53992,
  "priority": "High",
  "priorityTier": 3,
  "exploited": false,
  "vendorExploited": false,
  "disclosed": false,
  "vendorAdvisory": "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2026-33940",
  "fixes": [
    {
      "platform": "linux",
      "product": "node-handlebars",
      "release": "Debian 14",
      "fixedVersion": "3:4.7.9-1",
      "fix": "DEBIAN-CVE-2026-33940",
      "url": "https://patchblox.com/security/fix/linux/debian-cve-2026-33940",
      "released": "2026-03-27T22:16:21Z"
    }
  ],
  "noFixYet": [],
  "dataAsOf": "2026-11-08T13:06:02Z",
  "attribution": {
    "text": "Data: Patchblox Patch Radar",
    "url": "https://patchblox.com/security/patch-radar",
    "terms": "https://patchblox.com/security/patch-radar/use-the-data"
  }
}