CVE-2026-55794
Received Received - Intake

Authenticated Remote Code Execution via Twig Template in Craft CMS

Vulnerability report for CVE-2026-55794, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-07-02

Last updated on: 2026-07-02

Assigner: GitHub, Inc.

Description

Craft CMS is a content management system (CMS). In versions 5.9.0 and above prior to 5.10.0, control panel users with the ability to edit entries can execute unsandboxed Twig code via the HTTP Referrer header, potentially leading to authenticated RCE. The issue happens when a user is saving entries. Strings for a signed redirect URL are being compiled as a Twig template via renderObjectTemplate(), and while a sandboxed alternative already exists (renderSandboxedObjectTemplate()), it is not used in this case. This signed URL can be specified by users, as it is reflected in the β€œReferer” HTTP request header, which is under attacker control. This issue has been fixed in version 5.10.0.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-07-02
Last Modified
2026-07-02
Generated
2026-07-02
AI Q&A
2026-07-02
EPSS Evaluated
N/A
NVD

Affected Vendors & Products

Showing 2 associated CPEs
Vendor Product Version / Range
craftcms craft_cms to 5.10.0 (exc)
craftcms craft_cms 5.10.0

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-1336 The product uses a template engine to insert or process externally-influenced input, but it does not neutralize or incorrectly neutralizes special elements or syntax that can be interpreted as template expressions or other code directives when processed by the engine.
CWE-94 The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

CVE-2026-55794 is a vulnerability in Craft CMS versions 5.9.0 up to but not including 5.10.0. It allows authenticated control panel users who can edit entries to execute unsandboxed Twig code through the HTTP Referrer header. This happens because when saving entries, the system compiles strings for a signed redirect URL as a Twig template without sandboxing, using the function renderObjectTemplate(). Since the Referrer header is user-controlled, an attacker can manipulate it to inject malicious Twig code, potentially leading to remote code execution (RCE). This vulnerability was fixed in version 5.10.0.

Impact Analysis

This vulnerability can have a severe impact because it allows an authenticated user with entry editing permissions to execute arbitrary code on the server. This means an attacker could potentially take full control of the affected system, leading to data breaches, unauthorized access, or disruption of services. Since the exploit requires authentication, the risk is limited to users with certain privileges, but the consequences of exploitation are high.

Detection Guidance

This vulnerability involves exploitation via the HTTP Referrer header when authenticated users with entry editing permissions save entries in Craft CMS versions 5.9.0 to before 5.10.0.

To detect potential exploitation attempts on your system or network, you can monitor HTTP requests for suspicious or unusual Referer headers containing Twig template syntax or unexpected code patterns.

For example, you can use network traffic inspection tools or web server logs to search for Referer headers with Twig expressions like {{ or {%.

Suggested commands to search web server logs (assuming Apache or Nginx logs):

  • grep -i 'Referer:.*{{' /var/log/nginx/access.log
  • grep -i 'Referer:.*{%' /var/log/apache2/access.log
  • Use tools like tcpdump or Wireshark to capture HTTP traffic and filter for Referer headers containing Twig syntax.

Additionally, monitoring for unusual activity by authenticated users with entry editing permissions, especially around saving entries, can help detect exploitation attempts.

Mitigation Strategies

The primary and most effective mitigation step is to upgrade Craft CMS to version 5.10.0 or later, where this vulnerability has been fixed.

Until the upgrade can be performed, consider restricting entry editing permissions to trusted users only, as the vulnerability requires authenticated users with entry editing rights.

Additionally, monitor and filter HTTP requests to detect and block suspicious Referer headers that may contain malicious Twig code.

Review and apply any available security patches or updates provided by Craft CMS promptly.

Compliance Impact

The provided information does not specify how this vulnerability affects compliance with common standards and regulations such as GDPR or HIPAA.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-55794. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart