Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-31857-craftcms-ssti — Python proof-of-concept for CVE-2026-31857, an authenticated SSTI in Craft CMS control-panel condition rules that yields command execution via unsandboxed Twig object templates. | Kitploit
Tools/GitHubGitHub/trx-0/cve-2026-31857-craftcms-ssti
Vulnerability AnalysisExploitationWeb Application ExploitationWeb SecurityRemote Access Tool
GitHubtrx-0/cve-2026-31857-craftcms-ssti

CVE-2026-31857-craftcms-ssti

Python proof-of-concept for CVE-2026-31857, an authenticated SSTI in Craft CMS control-panel condition rules that yields command execution via unsandboxed Twig object templates.

View Repository
1 month agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    938
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    556
  • 3

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    352
  • 4

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    343
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    336
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    291

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-31857 — Craft CMS authenticated SSTI

An authorized reproducer for an authenticated server-side template injection in Craft CMS. A user with control-panel access can reach a condition-builder sink that evaluates an attacker-controlled object template in an unsandboxed Twig context, enabling command execution as the web-service account.

The PoC defaults to the non-destructive id command. It verifies the authenticated session after login and does not call an HTTP 200 proof of RCE unless expected command output is also present.

Affected versions

  • Craft CMS >= 5.0.0-RC1, <= 5.9.8; fixed in 5.9.9.
  • Craft CMS >= 4.0.0-beta.1, <= 4.17.3; fixed in 4.17.4.

Check the official advisory and your vendor's backport information when assessing a packaged build.

Vulnerability

The conditions system passes a controllable elementIds value to renderObjectTemplate():

BaseElementSelectConditionRule::getElementIds()
  -> Craft::$app->getView()->renderObjectTemplate($elementIds)

The PoC reaches that path through the control-panel element-search/search action using an entry AuthorConditionRule. Object templates execute in a trusted Twig environment, so the map("system") callback can invoke PHP's system() function:

{{ ["id"]|map("system")|join }}

The fix routes this value through the sandboxed object-template renderer. Settings such as devMode=false do not repair a vulnerable release; upgrade to a fixed version.

Requirements

  • Valid credentials for an account permitted to access the Craft control panel.
  • Network access to the Craft site.
  • Python 3; no third-party modules.

Usage

The password is read from a hidden prompt, keeping it out of the process list and shell history:

python3 cve-2026-31857.py https://target.example editor

The default command is id, and the PoC requires uid= in the response before reporting verified command execution. For automation, set CRAFT_PASSWORD in the environment.

For a custom, harmless marker:

python3 cve-2026-31857.py \
  https://target.example editor \
  'printf craft-31857-marker' \
  --expect craft-31857-marker

Useful transport and evidence options:

python3 cve-2026-31857.py https://target.example editor id \
  --proxy http://127.0.0.1:8080 \
  --output conditions-response.html

Use --insecure only for an authorized lab with an intentionally untrusted TLS certificate.

Use --site-id if the target's relevant Craft site is not ID 1. Some deployments may buffer or suppress process output. In that case an HTTP 200 proves only that the action accepted the request, not that the command ran. The script exits 3 and labels RCE unverified unless --expect (or the default id check) is found in the response. Save the full response with --output, or use a separately authorized out-of-band verification method.

Tests

Run the standard-library payload and workflow tests with python3 -m unittest -v.

References

  • Craft CMS advisory GHSA-fp5j-j7j4-mcxc
  • Craft CMS fix
  • Craft CMS releases

Disclaimer

For authorized security testing and research only. Use it only against systems you own or have explicit permission to test.

Download Tool