CVE-2026-55794: Craft CMS Remote Code Execution Vulnerability

HIGH
Advisory Identifier: GHSA-f74w-488g-8x5r
CWE-94
Published
Advisory Summary

CVE-2026-55794 is a HIGH remote code execution vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Craft CMS libraries in the Packagist ecosystem. The issue involves potential authenticated remote code execution via referrer redirect. Remediation is available by upgrading affected packages to version 5.10.0.

CVE-2026-55794 at a Glance

CVE Identifier CVE-2026-55794
GHSA Identifier GHSA-f74w-488g-8x5r
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product Craft CMS
Package Ecosystem Packagist
Published Date
Last Updated

How to Fix CVE-2026-55794

To remediate this vulnerability, upgrade all affected Craft CMS dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

craftcms/cms fixed: 5.10.0
Upgrade craftcms/cms to 5.10.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for craftcms/cms

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-55794, inspect your project dependencies for Craft CMS:

inspect dependencies for craftcms/cms

Analyze the terminal output to locate any version of Craft CMS in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.10.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where 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. In Craft CMS, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Requirements: * Control panel access * Permissions to edit an entry ### Details Control panel users with the ability to edit entries can execute unsandboxed Twig code via the HTTP Referrer header. 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 has been fixed in Craft 5.10.0. Affected users should update to that version or higher to get the fix. ### Resources https://github.com/craftcms/cms/pull/18680

CVE-2026-55794 Affected Craft CMS Versions

1 component(s)
Fixed Versions:
5.10.0
Product / Package Ecosystem Affected Versions Fixed Version
craftcms/cms
Packagist
≥ 5.9.0
< 5.10.0
5.10.0

References

Frequently Asked Questions

What is CVE-2026-55794?
CVE-2026-55794 is a security vulnerability in Craft CMS involving Potential authenticated Remote Code Execution via referrer redirect under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which Craft CMS versions are affected?
Affected versions include releases prior to 5.10.0 across affected packages: craftcms/cms.
What version fixes CVE-2026-55794?
Upgrading to 5.10.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is craftcms/cms affected?
Yes, craftcms/cms is affected in releases prior to 5.10.0. Upgrade your dependency to 5.10.0 or later.
What CWE is associated with CVE-2026-55794?
CVE-2026-55794 is classified under CWE-94: Improper Control of Generation of Code ('Code Injection') (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.).
How can I check Packagist dependencies for CVE-2026-55794?
Run the dependency tree command: 'inspect dependencies for craftcms/cms'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-f74w-488g-8x5r",
  "modified" : "2026-07-06T21:37:06Z",
  "published" : "2026-07-06T21:37:06Z",
  "aliases" : [ "CVE-2026-55794" ],
  "summary" : "Craft CMS: Potential authenticated Remote Code Execution via referrer redirect",
  "details" : "### Requirements:\n\n* Control panel access\n* Permissions to edit an entry\n\n### Details\n\nControl panel users with the ability to edit entries can execute unsandboxed Twig code via the HTTP Referrer header.\n\nThe 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.\n\nThis has been fixed in Craft 5.10.0. Affected users should update to that version or higher to get the fix.\n\n### Resources\n\nhttps://github.com/craftcms/cms/pull/18680",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:L/SI:L/SA:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "craftcms/cms"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.9.0"
      }, {
        "fixed" : "5.10.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/craftcms/cms/security/advisories/GHSA-f74w-488g-8x5r"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-55794"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/craftcms/cms/pull/18680"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/craftcms/cms"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-94" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-06T21:37:06Z",
    "nvd_published_at" : "2026-07-02T00:16:45Z"
  }
}