PoC Monitor
← All CVEs
CVE-2026-33937published 27 Mar 2026 21:03 UTCData: JSON · API

Handlebars.js

Handlebars.js has JavaScript Injection via AST Type Confusion

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.

First public PoC 16 hafter publication · 28 Mar 2026
Public PoCs44 on GitHub
CVSS9.8critical · scored by CNA · CWE-843
CISA KEV Not listednot known exploited

Affected versions and mitigation

From the CVE record and the vendor's references.

Affected

handlebars-lang handlebars.js
  • >= 4.0.0, < 4.7.9

Fixed in 4.7.9

Mitigation

Upgrade handlebars.js to 4.7.9 or later.

References

Timeline

Days relative to CVE publication
-2t=0+2+4+6+8CVE published27 Mar 2026 · t = 0First public PoC28 Mar 2026 · t+16h

First public PoC 16 h after publication; not in CISA KEV. First PoC: dinhvaren/cve-2026-33937 (created 28 Mar 2026, found by us: backfilled).

PoC repositories

Found on GitHub.

4 PoCs

PoCs 4
RepositoryCreatedStarsAssessment
dinhvaren/cve-2026-33937 28 Mar 2026 +16 h 1 PoC
EQSTLab/CVE-2026-33937 22 Apr 2026 +25 d 3 PoC
garlic-wizard/CVE-2026-33937-for-DarkZeroReturns 30 Jul 2026 +125 d 0 PoC
c0gnit00/CVE-2026-33937 3 Aug 2026 +128 d 1 PoC

Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.

PoC characteristics

What to hunt for in your logs · from 4 PoC repos

POST /character

Body markers
"_csrf" "name" "race":"Human" "class":"Wizard" "backstory":"pwn" "campaign_id":"1" "campaign_message" in application/json
Seen in
2 repos: c0gnit00/CVE-2026-33937, garlic-wizard/CVE-2026-33937-for-DarkZeroReturns
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

GET /campaign/1

Seen in
1 repo: c0gnit00/CVE-2026-33937
Evidence
c0gnit00/CVE-2026-33937/exploit.py:137

POST /api/email/preview

Body markers
"subject":"test" "editorTemplateData" in application/json
Ports
8080, 12701
Seen in
1 repo: EQSTLab/CVE-2026-33937
Evidence
EQSTLab/CVE-2026-33937/README.md:59 EQSTLab/CVE-2026-33937/exploit.py:68

POST /login

Body markers
_csrf= email= password= in application/x-www-form-urlencoded
Seen in
1 repo: c0gnit00/CVE-2026-33937
Evidence
c0gnit00/CVE-2026-33937/exploit.py:46

Regex

Generated from PoC characteristics; not yet reviewed. Matches the request path and query.

POST /character
(?i)^/character(?:[?#].*)?$
GET /campaign/1
(?i)^/campaign/1(?:[?#].*)?$
GET /campaign/{var}
(?i)^/campaign/[^/?#]*(?:[?#].*)?$
GET /character/new
(?i)^/character/new(?:[?#].*)?$
POST /api/email/preview
(?i)^/api/email/preview(?:[?#].*)?$

Suricata

Template generated from PoC characteristics. Review before deploying.

POST /character
alert http any any -> $HOME_NET any (msg:"GG PoC-Monitor CVE-2026-33937 handlebars-lang handlebars.js exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/character"; http.request_body; content:"|22|_csrf|22|"; http.request_body; content:"|22|name|22|"; http.request_body; content:"|22|race|22|:|22|Human|22|"; http.request_body; content:"|22|class|22|:|22|Wizard|22|"; http.request_body; content:"|22|backstory|22|:|22|pwn|22|"; http.request_body; content:"|22|campaign_id|22|:|22|1|22|"; http.request_body; content:"|22|campaign_message|22|"; reference:url,poc.griffinguard.io/cve/CVE-2026-33937; classtype:web-application-attack; sid:9319252; rev:1;)
GET /campaign/1
alert http any any -> $HOME_NET any (msg:"GG PoC-Monitor CVE-2026-33937 handlebars-lang handlebars.js exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/campaign/1"; reference:url,poc.griffinguard.io/cve/CVE-2026-33937; classtype:web-application-attack; sid:9159113; rev:1;)
GET /campaign/{var}
alert http any any -> $HOME_NET any (msg:"GG PoC-Monitor CVE-2026-33937 handlebars-lang handlebars.js exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/campaign/"; reference:url,poc.griffinguard.io/cve/CVE-2026-33937; classtype:web-application-attack; sid:9463831; rev:1;)
GET /character/new
alert http any any -> $HOME_NET any (msg:"GG PoC-Monitor CVE-2026-33937 handlebars-lang handlebars.js exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/character/new"; reference:url,poc.griffinguard.io/cve/CVE-2026-33937; classtype:web-application-attack; sid:9123747; rev:1;)
POST /api/email/preview
alert http any any -> $HOME_NET [8080,12701] (msg:"GG PoC-Monitor CVE-2026-33937 handlebars-lang handlebars.js exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/api/email/preview"; http.request_body; content:"|22|subject|22|:|22|test|22|"; http.request_body; content:"|22|editorTemplateData|22|"; reference:url,poc.griffinguard.io/cve/CVE-2026-33937; classtype:web-application-attack; sid:9799003; rev:1;)

Sigma

Template generated from PoC characteristics. Review before deploying.

POST /character
title: handlebars-lang handlebars.js exploit attempt (CVE-2026-33937)
id: gg-pocmon-cve-2026-33937-9319252
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-33937. Generated, not reviewed.
references:
  - https://poc.griffinguard.io/cve/CVE-2026-33937
logsource:
  category: webserver
detection:
  selection:
    cs-method: POST
    cs-uri-stem|contains|all:
      - '/character'
  condition: selection
falsepositives:
  - Authorized vulnerability scanning
level: critical
tags:
  - attack.initial_access
  - attack.t1190
  - cve.2026.33937
GET /campaign/1
title: handlebars-lang handlebars.js exploit attempt (CVE-2026-33937)
id: gg-pocmon-cve-2026-33937-9159113
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-33937. Generated, not reviewed.
references:
  - https://poc.griffinguard.io/cve/CVE-2026-33937
logsource:
  category: webserver
detection:
  selection:
    cs-method: GET
    cs-uri-stem|contains|all:
      - '/campaign/1'
  condition: selection
falsepositives:
  - Authorized vulnerability scanning
level: critical
tags:
  - attack.initial_access
  - attack.t1190
  - cve.2026.33937
GET /campaign/{var}
title: handlebars-lang handlebars.js exploit attempt (CVE-2026-33937)
id: gg-pocmon-cve-2026-33937-9463831
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-33937. Generated, not reviewed.
references:
  - https://poc.griffinguard.io/cve/CVE-2026-33937
logsource:
  category: webserver
detection:
  selection:
    cs-method: GET
    cs-uri-stem|contains|all:
      - '/campaign/'
  condition: selection
falsepositives:
  - Authorized vulnerability scanning
level: critical
tags:
  - attack.initial_access
  - attack.t1190
  - cve.2026.33937
GET /character/new
title: handlebars-lang handlebars.js exploit attempt (CVE-2026-33937)
id: gg-pocmon-cve-2026-33937-9123747
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-33937. Generated, not reviewed.
references:
  - https://poc.griffinguard.io/cve/CVE-2026-33937
logsource:
  category: webserver
detection:
  selection:
    cs-method: GET
    cs-uri-stem|contains|all:
      - '/character/new'
  condition: selection
falsepositives:
  - Authorized vulnerability scanning
level: critical
tags:
  - attack.initial_access
  - attack.t1190
  - cve.2026.33937
POST /api/email/preview
title: handlebars-lang handlebars.js exploit attempt (CVE-2026-33937)
id: gg-pocmon-cve-2026-33937-9799003
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-33937. Generated, not reviewed.
references:
  - https://poc.griffinguard.io/cve/CVE-2026-33937
logsource:
  category: webserver
detection:
  selection:
    cs-method: POST
    cs-uri-stem|contains|all:
      - '/api/email/preview'
  condition: selection
falsepositives:
  - Authorized vulnerability scanning
level: critical
tags:
  - attack.initial_access
  - attack.t1190
  - cve.2026.33937