PoC Monitor
← All CVEs
CVE-2026-31857published 11 Mar 2026 17:30 UTCData: JSON · API

CraftCMS cms

CraftCMS has an RCE vulnerability via relational conditionals in the control panel

Craft is a content management system (CMS). Prior to 5.9.9 and 4.17.4, a Remote Code Execution vulnerability exists in the Craft CMS 5 conditions system. The BaseElementSelectConditionRule::getElementIds() method passes user-controlled string input through renderObjectTemplate() -- an unsandboxed Twig rendering function with escaping disabled. Any authenticated Control Panel user (including non-admin roles such as Author or Editor) can achieve full RCE by sending a crafted condition rule via standard element listing endpoints. This vulnerability requires no admin privileges, no special permissions beyond basic control panel access, and bypasses all production hardening settings (allowAdminChanges: false, devMode: false, enableTwigSandbox: true). Users should update to the patched 5.9.9 or 4.17.4 release to mitigate the issue.

First public PoC 166 daysafter publication · 24 Aug 2026
Public PoCs55 on GitHub
CVSS8.8high · scored by NVD · CWE-94
CISA KEV Not listednot known exploited

Affected versions and mitigation

From the CVE record and the vendor's references.

Affected

craftcms cms
  • >= 5.0.0-RC1, < 5.9.9
  • >= 4.0.0-beta.1, < 4.17.4

Fixed in 5.9.9, 4.17.4

Mitigation

Upgrade cms to 5.9.9 or 4.17.4 or later.

References

Timeline

Days relative to CVE publication
t=0+30+60+90+120+150CVE published11 Mar 2026 · t = 0First public PoC24 Aug 2026 · t+166d

First public PoC 166 days after publication; not in CISA KEV. First PoC: TRX-0/CVE-2026-31857-craftcms-ssti (created 24 Aug 2026, found by us: backfilled).

PoC repositories

Found on GitHub.

5 PoCs

PoCs 5
RepositoryCreatedStarsAssessment
TRX-0/CVE-2026-31857-craftcms-ssti 24 Aug 2026 +166 d 0 PoC
0xTatsuki/CVE-2026-31857 29 Sep 2026 +202 d 0 PoC
0Asylum/CVE-2026-31857 30 Sep 2026 +202 d 1 PoC
WhiteMachin3/CVE-2026-31857 5 Oct 2026 +208 d 0 PoC
kaizoku73/CVE-2026-31857-PoC 8 Oct 2026 +211 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 5 PoC repos

POST /index.php

Query
p=admin/actions/users/login v=1790685103019 p=admin/actions/element-indexes/count-elements v=1790456540747
Key headers
Accept: application/json, text/plain, */* X-Csrf-Token: {var} X-Requested-With: XMLHttpRequest
Body markers
"loginName" "password" "rememberMe":"" "elementType":"craft\elements\Entry" "source":"*" "filters" in application/json
Seen in
2 repos: 0xTatsuki/CVE-2026-31857, kaizoku73/CVE-2026-31857-PoC
Evidence
0xTatsuki/CVE-2026-31857/CVE-2026-31857.py:63 0xTatsuki/CVE-2026-31857/CVE-2026-31857.py:151 kaizoku73/CVE-2026-31857-PoC/exploit.py:37 kaizoku73/CVE-2026-31857-PoC/exploit.py:73

POST" IF DATA IS NOT NONE ELSE "GET /index.php

Query
{var}=
Key headers
Accept: application/json X-Requested-With: XMLHttpRequest
Seen in
1 repo: 0Asylum/CVE-2026-31857
Evidence
0Asylum/CVE-2026-31857/poc.py:73

Regex

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

POST /index.php
(?i)^/index\.php\?(?:.*&)?p=admin/actions/users/login.*v=1790685103019.*p=admin/actions/element-indexes/count-elements.*v=1790456540747
GET ///{var}
(?i)^///[^/?#]*(?:[?#].*)?$
GET /admin/login
(?i)^/admin/login(?:[?#].*)?$
POST" IF DATA IS NOT NONE ELSE "GET /index.php
(?i)^/index\.php\?(?:.*&)?\{var\}=

Suricata

Template generated from PoC characteristics. Review before deploying.

POST /index.php
alert http any any -> $HOME_NET any (msg:"GG PoC-Monitor CVE-2026-31857 craftcms cms exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/index.php"; http.uri; content:"p=admin/actions/users/login"; http.uri; content:"v=1790685103019"; http.uri; content:"p=admin/actions/element-indexes/count-elements"; http.uri; content:"v=1790456540747"; http.header; content:"Accept: application/json, text/plain, */*"; nocase; http.header_names; content:"X-Csrf-Token"; nocase; http.header; content:"X-Requested-With: XMLHttpRequest"; nocase; http.request_body; content:"|22|loginName|22|"; http.request_body; content:"|22|password|22|"; http.request_body; content:"|22|rememberMe|22|:|22||22|"; http.request_body; content:"|22|elementType|22|:|22|craft|5c|elements|5c|Entry|22|"; http.request_body; content:"|22|source|22|:|22|*|22|"; http.request_body; content:"|22|filters|22|"; reference:url,poc.griffinguard.io/cve/CVE-2026-31857; classtype:web-application-attack; sid:9871054; rev:1;)
GET ///{var}
alert http any any -> $HOME_NET any (msg:"GG PoC-Monitor CVE-2026-31857 craftcms cms exploit attempt"; flow:established,to_server; http.method; content:"GET"; reference:url,poc.griffinguard.io/cve/CVE-2026-31857; classtype:web-application-attack; sid:9682463; rev:1;)
GET /admin/login
alert http any any -> $HOME_NET any (msg:"GG PoC-Monitor CVE-2026-31857 craftcms cms exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/admin/login"; reference:url,poc.griffinguard.io/cve/CVE-2026-31857; classtype:web-application-attack; sid:9860897; rev:1;)
POST" IF DATA IS NOT NONE ELSE "GET /index.php
alert http any any -> $HOME_NET any (msg:"GG PoC-Monitor CVE-2026-31857 craftcms cms exploit attempt"; flow:established,to_server; http.method; content:"POST|22| IF DATA IS NOT NONE ELSE |22|GET"; http.uri; content:"/index.php"; http.uri; content:"{var}="; http.header; content:"Accept: application/json"; nocase; http.header; content:"X-Requested-With: XMLHttpRequest"; nocase; reference:url,poc.griffinguard.io/cve/CVE-2026-31857; classtype:web-application-attack; sid:9360817; rev:1;)

Sigma

Template generated from PoC characteristics. Review before deploying.

POST /index.php
title: craftcms cms exploit attempt (CVE-2026-31857)
id: gg-pocmon-cve-2026-31857-9871054
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-31857. Generated, not reviewed.
references:
  - https://poc.griffinguard.io/cve/CVE-2026-31857
logsource:
  category: webserver
detection:
  selection:
    cs-method: POST
    cs-uri-stem|contains|all:
      - '/index.php'
    cs-uri-query|contains|all:
      - 'p=admin/actions/users/login'
      - 'v=1790685103019'
      - 'p=admin/actions/element-indexes/count-elements'
      - 'v=1790456540747'
  condition: selection
falsepositives:
  - Authorized vulnerability scanning
level: high
tags:
  - attack.initial_access
  - attack.t1190
  - cve.2026.31857
GET ///{var}
title: craftcms cms exploit attempt (CVE-2026-31857)
id: gg-pocmon-cve-2026-31857-9682463
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-31857. Generated, not reviewed.
references:
  - https://poc.griffinguard.io/cve/CVE-2026-31857
logsource:
  category: webserver
detection:
  selection:
    cs-method: GET
  condition: selection
falsepositives:
  - Authorized vulnerability scanning
level: high
tags:
  - attack.initial_access
  - attack.t1190
  - cve.2026.31857
GET /admin/login
title: craftcms cms exploit attempt (CVE-2026-31857)
id: gg-pocmon-cve-2026-31857-9860897
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-31857. Generated, not reviewed.
references:
  - https://poc.griffinguard.io/cve/CVE-2026-31857
logsource:
  category: webserver
detection:
  selection:
    cs-method: GET
    cs-uri-stem|contains|all:
      - '/admin/login'
  condition: selection
falsepositives:
  - Authorized vulnerability scanning
level: high
tags:
  - attack.initial_access
  - attack.t1190
  - cve.2026.31857
POST" IF DATA IS NOT NONE ELSE "GET /index.php
title: craftcms cms exploit attempt (CVE-2026-31857)
id: gg-pocmon-cve-2026-31857-9360817
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-31857. Generated, not reviewed.
references:
  - https://poc.griffinguard.io/cve/CVE-2026-31857
logsource:
  category: webserver
detection:
  selection:
    cs-method: POST" IF DATA IS NOT NONE ELSE "GET
    cs-uri-stem|contains|all:
      - '/index.php'
    cs-uri-query|contains|all:
      - '{var}='
  condition: selection
falsepositives:
  - Authorized vulnerability scanning
level: high
tags:
  - attack.initial_access
  - attack.t1190
  - cve.2026.31857