{
  "id": "CVE-2026-33937",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-33937",
  "published_at": "2026-03-27T21:03:46.748Z",
  "title": "Handlebars.js has JavaScript Injection via AST Type Confusion",
  "vendor": "handlebars-lang",
  "product": "handlebars.js",
  "cvss": {
    "score": 9.8,
    "source": "cna",
    "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": {
    "created_at": "2026-03-28T13:24:22Z",
    "first_seen_at": "2026-11-14T11:25:11.578Z",
    "days_after_publication": 0.7,
    "repo": "dinhvaren/cve-2026-33937",
    "source": "github"
  },
  "poc_repo_count": 4,
  "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, `Handlebars.compile()` accepts a pre-parsed AST object in addition to a template string. The `value` field of a `NumberLiteral` AST node is emitted directly into the generated JavaScript without quoting or sanitization. An attacker who can supply a crafted AST to `compile()` can therefore inject and execute arbitrary JavaScript, leading to Remote Code Execution on the server. Version 4.7.9 fixes the issue. Some workarounds are available. Validate input type before calling `Handlebars.compile()`; ensure the argument is always a  `string`, never a plain object or JSON-deserialized value. Use the Handlebars runtime-only build (`handlebars/runtime`) on the server if templates are pre-compiled at build time; `compile()` will be unavailable.",
  "cwe": "CWE-843",
  "cpes": [
    "cpe:2.3:a:handlebarsjs:handlebars:*:*:*:*:*:node.js:*:*"
  ],
  "cvss_by_source": {
    "cna": 9.8
  },
  "repos": [
    {
      "repo": "dinhvaren/cve-2026-33937",
      "url": "https://github.com/dinhvaren/cve-2026-33937",
      "created_at": "2026-03-28T13:24:22Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 1,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2023-11-02T11:54:03Z"
    },
    {
      "repo": "EQSTLab/CVE-2026-33937",
      "url": "https://github.com/EQSTLab/CVE-2026-33937",
      "created_at": "2026-04-22T05:09:10Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 3,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2023-10-25T15:10:45Z"
    },
    {
      "repo": "garlic-wizard/CVE-2026-33937-for-DarkZeroReturns",
      "url": "https://github.com/garlic-wizard/CVE-2026-33937-for-DarkZeroReturns",
      "created_at": "2026-07-30T20:23:32Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 0,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2020-08-22T08:18:18Z"
    },
    {
      "repo": "c0gnit00/CVE-2026-33937",
      "url": "https://github.com/c0gnit00/CVE-2026-33937",
      "created_at": "2026-08-03T06:27:58Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 1,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2024-06-08T10:53:02Z"
    }
  ],
  "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-2w6w-674q-4c4q"
      },
      {
        "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": [
    {
      "method": "POST",
      "path_template": "/character",
      "body_markers": [
        "\"_csrf\"",
        "\"name\"",
        "\"race\":\"Human\"",
        "\"class\":\"Wizard\"",
        "\"backstory\":\"pwn\"",
        "\"campaign_id\":\"1\"",
        "\"campaign_message\""
      ],
      "content_type": "application/json",
      "protocol": "http",
      "repos": [
        "c0gnit00/CVE-2026-33937",
        "garlic-wizard/CVE-2026-33937-for-DarkZeroReturns"
      ],
      "repo_count": 2,
      "confidence": 0.7,
      "evidence": [
        "c0gnit00/CVE-2026-33937/exploit.py:168",
        "garlic-wizard/CVE-2026-33937-for-DarkZeroReturns/poc.py:265",
        "garlic-wizard/CVE-2026-33937-for-DarkZeroReturns/poc.py:282"
      ]
    },
    {
      "method": "GET",
      "path_template": "/campaign/1",
      "protocol": "http",
      "repos": [
        "c0gnit00/CVE-2026-33937"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "c0gnit00/CVE-2026-33937/exploit.py:137"
      ]
    },
    {
      "method": "GET",
      "path_template": "/campaign/{var}",
      "protocol": "http",
      "repos": [
        "garlic-wizard/CVE-2026-33937-for-DarkZeroReturns"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "garlic-wizard/CVE-2026-33937-for-DarkZeroReturns/poc.py:189"
      ]
    },
    {
      "method": "GET",
      "path_template": "/character/new",
      "protocol": "http",
      "repos": [
        "garlic-wizard/CVE-2026-33937-for-DarkZeroReturns"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "garlic-wizard/CVE-2026-33937-for-DarkZeroReturns/poc.py:33"
      ]
    },
    {
      "method": "POST",
      "path_template": "/api/email/preview",
      "body_markers": [
        "\"subject\":\"test\"",
        "\"editorTemplateData\""
      ],
      "content_type": "application/json",
      "ports": [
        8080,
        12701
      ],
      "protocol": "http",
      "repos": [
        "EQSTLab/CVE-2026-33937"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "EQSTLab/CVE-2026-33937/README.md:59",
        "EQSTLab/CVE-2026-33937/exploit.py:68"
      ]
    },
    {
      "method": "POST",
      "path_template": "/login",
      "body_markers": [
        "_csrf=",
        "email=",
        "password="
      ],
      "content_type": "application/x-www-form-urlencoded",
      "protocol": "http",
      "repos": [
        "c0gnit00/CVE-2026-33937"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "c0gnit00/CVE-2026-33937/exploit.py:46"
      ]
    }
  ],
  "rules": []
}
