Response playbooks, investigation guides, and Atomic Red Team tests are Pro-only. Upgrade to unlock the full detection package for CVE-2026-9558.

Upgrade to Pro
CVE-2026-9558 Elastic Security · Elastic

Detect Mautic Server-Side Template Injection (SSTI) in Theme Templates in Elastic Security

Detects exploitation of CVE-2026-9558, a critical (CVSS 9.9) Server-Side Template Injection vulnerability in Mautic's theme template engine (CWE-1336, Twig-based SSTI). An authenticated or in some deployments unauthenticated attacker can inject malicious Twig template syntax through theme customization, email/landing page builder, or theme upload/import functionality, achieving remote code execution on the underlying PHP host. Affects mautic/core versions >=1.3.0 <4.4.13, >=5.0.0 <5.2.11, >=6.0.0 <6.0.9, and >=7.0.0 <7.1.2. A public PoC/advisory exists (GHSA-9fx4-7cmj-47vg).

MITRE ATT&CK

Tactic
Initial Access Execution

Elastic Detection Query

Elastic Security (Elastic)
eql
sequence by http.client_ip with maxspan=5m
  [network where event.dataset == "nginx.access" and http.request.method in ("POST", "PUT") and url.path : ("*/s/themes*", "*/s/emails*", "*/s/pages*", "*/theme/upload*", "*/api/themes*") and (url.query : "*%7B%7B*" or url.query : "*__construct*" or url.query : "*system(*")]
  [process where event.type == "start" and process.parent.name : ("php-fpm*", "php*", "apache2*", "nginx*") and process.name in ("sh", "bash", "whoami", "id", "curl", "wget", "python*", "perl")]
critical severity medium confidence

Correlates a suspicious Twig-injection HTTP request against Mautic theme/email endpoints followed within 5 minutes by an unexpected child process spawned from the PHP/web server process, indicating successful SSTI-to-RCE exploitation of CVE-2026-9558.

Data Sources

nginx access logsprocess creation (Elastic Endpoint/Auditbeat)

Required Tables

logs-nginx.access-*logs-endpoint.events.process-*

False Positives & Tuning

  • Legitimate admin scripts or cron jobs invoked by the web server user around the same time as unrelated web traffic
  • Deployment/CI automation that runs shell commands via a web-triggered webhook
  • Health-check or monitoring agents spawning short-lived shell utilities from php-fpm workers

Other platforms for CVE-2026-9558


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Twig SSTI probe against theme endpoint

    Expected signal: Web access log entry for POST /s/themes/edit/1 containing the literal string {{7*7}}; if vulnerable, the rendered theme output contains '49'.

  2. Test 2Twig-to-PHP function call injection

    Expected signal: Web log entry showing POST to /s/emails/edit/1 with __construct/getFilter/system( markers; process telemetry showing php-fpm spawning 'id' if the gadget chain succeeds in the lab sandbox.

  3. Test 3Post-exploitation shell spawn simulation from PHP-FPM

    Expected signal: Process creation events showing bash/id/whoami/curl spawned with parent process php-fpm running as www-data, plus an outbound connection to the test callback listener.

Unlock playbooks & atomic tests with Pro

Get the full detection package for CVE-2026-9558 — response playbook and atomic red team tests, plus investigation guidance and hunting queries.

df00tech Pro — £29/user/month

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections