/

CVE-2026-28425

Severity:

HIGH RISK

(8.0)

Code Injection in Statamic Control Panel

CVE-2026-28425

Modified

Vulnerability type

Category:

Code Injection

CWE:

CWE-94

Impact:

Remote Code Execution in application context

Severity:

HIGH RISK

(8.0)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Statamic's Antlers templating engine can be abused by authenticated control panel users to inject and execute code in the application context when it is enabled on user-controlled content.

Where Antlers is evaluated on attacker-controlled fields or configuration, a malicious user with the right permissions may be able to achieve remote code execution, leading to full application compromise.

Affected context

This vulnerability appears in Statamic deployments where:

  • The Antlers templating engine is enabled on fields or configuration that accept user-controlled content, and
  • Authenticated control panel users are granted permissions to configure or edit those Antlers-enabled inputs.

Typical examples include:

  • Content fields with Antlers explicitly enabled (requires permission to configure fields and edit entries)
  • Built-in configuration that supports Antlers, such as Forms email notification templates (requires configuration permission)
  • Third-party addons that expose Antlers-enabled fields, such as SEO or marketing addons.

The issue does not affect environments where Antlers is never evaluated on attacker-controllable data or where control panel permissions are tightly restricted.

Exploit preconditions

  • Attack surface: Statamic control panel and any Antlers-enabled inputs in content or configuration.
  • Required access: Authenticated Statamic user with:
  • Permission to configure or use Antlers-enabled fields, or
  • Permission to modify configuration values or addon settings that accept Antlers templates.
  • Trigger point: The application renders or evaluates Antlers templates that include attacker-supplied content (e.g., when viewing entries, sending notifications, or rendering pages/emails that process the template).
  • Why exploitation is possible: Antlers expressions in user-controlled content are evaluated with high trust in the application context, enabling template constructs to be repurposed as a code execution primitive instead of purely for presentation logic.

Why this happens

The underlying issue is a code injection flaw in the templating pipeline, aligning with CWE-94: Improper Control of Generation of Code (Code Injection).

Antlers is a powerful template language that, when evaluated, can interact deeply with the application environment. In affected configurations, Antlers is allowed to process data that is both:

  • Directly influenced by authenticated users, and
  • Evaluated with privileges equivalent to the application itself.

Because the template engine can invoke complex behavior and access sensitive internals, treating user-controlled template content as trusted logic blurs the boundary between data and executable code. Without sufficient restrictions or sandboxing, an attacker can craft template input that is interpreted as executable constructs, resulting in arbitrary code execution in the application context.

Potential impact

  • Full compromise of the Statamic application runtime in the context of the web process.
  • Access to sensitive configuration, including environment secrets and database credentials that the application can read.
  • Unauthorized modification or exfiltration of content, user data, and configuration stored by the CMS.
  • Abuse of the compromised instance to pivot deeper into the hosting environment or connected services, subject to existing permissions.
  • Degradation or denial of service by executing expensive operations through malicious templates.

General mitigation guidance

Effective mitigation focuses on limiting where and how Antlers is allowed to process user-controllable data and ensuring templates cannot escalate to code execution:

  • Restrict template evaluation: Avoid enabling Antlers on fields that can be modified by non-administrative or semi-trusted users. Prefer plain text or markdown where dynamic behavior is not strictly required.
  • Harden permissions: Apply least-privilege principles to control panel roles. Only grant field configuration and configuration-editing permissions to highly trusted administrators, and review which roles can interact with Antlers-enabled fields.
  • Reduce engine capabilities where possible: Prefer safer, constrained template constructs for user-editable areas rather than fully featured templating that can access internal APIs or logic-like behavior.
  • Segregate sensitive configuration: Keep highly sensitive values out of template-driven configuration paths wherever possible to reduce the impact of potential template abuse.
  • Runtime isolation: Run the application with minimal OS-level privileges and, where feasible, isolate the application in containers or separate processes so that a compromise within the template engine has less reach into the underlying system.

How teams detect issues like this

Organizations can use a combination of review and tooling to detect similar risks:

  • Configuration and content review: Inventory all fields and settings where Antlers is enabled and identify which of those are writable by non-fully-trusted users or roles.
  • Static analysis and rule-based checks: Implement custom checks in code review or CI pipelines that flag the introduction of new Antlers-enabled fields or configuration keys, especially in admin-accessible areas or addons.
  • Template audit: Review Antlers templates, especially those influenced by user content, for patterns that provide broad access to application internals or dynamic evaluation features.
  • Policy enforcement: Establish internal security guidelines for addon developers and site implementers that prohibit or limit Antlers usage on user-editable fields, enforcing these rules through checklists or automated linting where possible.
  • Monitoring and logging: Enable detailed logging of control panel activity and template-related errors. Anomalous patterns—such as unexpected template failures or unusual admin actions—can help surface attempted exploitation.

Sources

SourceLink
github.comgithub.com/statamic/cms/releases/tag/v5.73.11
github.comgithub.com/statamic/cms/releases/tag/v6.4.0
github.comgithub.com/statamic/cms/security/advisories/GHSA-cpv7-q2wx-m8rw

Frequently asked

questions

Yes, but only by authenticated users with specific control panel permissions. An attacker must be able to log into the Statamic control panel and reach Antlers-enabled inputs that are later evaluated by the application.

The attacker needs valid Statamic credentials and relevant permissions—for example, the ability to configure fields and edit entries with Antlers enabled, modify configuration options that support Antlers (such as form email templates), or manage entries in addons that expose Antlers-enabled fields.

Limit Antlers evaluation to trusted templates that are not user-editable, remove or disable Antlers on fields that non-admin users can modify, and ensure that only highly trusted administrators can configure any Antlers-enabled content or settings.

Treat template languages as potential code execution surfaces: avoid evaluating templates built from user-controlled input, apply strict role-based permissions for any configuration that influences template logic, and formalize a review process for enabling powerful templating features in addons or new fields.

Find out what's already
exploitable in your codebase.