Skip to main content

Craft CMS CVE-2026-55791

MEDIUM
Origin Validation Error (CWE-346)
2026-06-19 https://github.com/craftcms/cms GHSA-c55v-343g-5xff
6.9
CVSS 4.0 · Vendor: https://github.com/craftcms/cms
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Identify Craft CMS behind shared cache
  2. Delivery
    Send /actions/app/resource-js request with X-Forwarded-Host poisoning
  3. Exploit
    Yii2 rewrites $baseUrl, validation bypassed
  4. Install
    Guzzle fetches attacker JS, returned as application/javascript
  5. C2
    Cache layer stores poisoned response for legitimate URI
  6. Execute
    Admin loads Control Panel, browser executes JS
  7. Impact
    Steal CSRF token, POST install-plugin for RCE

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A07:2025 - Authentication Failures
ASVS 5.0
V6 - Authentication Origin validation
Exploitation Conditions

Requires three concrete conditions to reach maximum impact: (1) the target Craft 4.x/5.x instance must have assetManager.cacheSourcePaths set to false (the vulnerable Guzzle-fetch branch is gated on this); (2) trustedHosts must remain at its default value of ['any'], or include the attacker-controllable hostname, so Yii2 accepts X-Forwarded-Host header poisoning; (3) for the cache-poisoning → admin XSS → 1-click RCE chain, the site must sit behind a shared HTTP caching layer (Varnish/Fastly/Cloudflare/Nginx fastcgi_cache) AND an authenticated administrator must subsequently visit the Control Panel. Without condition (3) the impact is limited to blind SSRF and reflected JS to the requesting client only. The endpoint enforces requireCpRequest() but does not require authentication, so initial triggering is unauthenticated.

Impact

No CVSS vector or EPSS score was provided in the input, and the issue is not on the CISA KEV list - exploitation status is therefore 'no public exploit identified at time of analysis,' despite a fully documented vendor advisory describing the attack chain. The realistic ceiling is severe (unauthenticated RCE via web cache poisoning → admin XSS → plugin install session-riding), but the floor is much lower: it requires the non-default assetManager.cacheSourcePaths=false setting AND a shared HTTP cache layer in front of Craft AND an admin who subsequently logs in. Without the cache layer the impact degrades to blind SSRF and reflected JS to the triggering client only. The CWE-346 root cause and structural dependence on default trustedHosts='any' make this a real prioritization concern for any Craft 4.x/5.x deployment fronted by Varnish/Cloudflare/Fastly with non-default asset settings, but it is not a 'patch tonight' issue for default-config deployments.

Exploit ScenarioDerived

An unauthenticated attacker sends a request to /actions/app/resource-js with X-Forwarded-Host: attacker.tld and a url parameter pointing at attacker.tld; Yii2 trusts the header due to trustedHosts='any', $baseUrl is rewritten, the validation passes, and Guzzle (with redirects enabled) fetches attacker-controlled JavaScript and returns it with Content-Type: application/javascript. If the site sits behind a shared cache, the poisoned response is cached for the legitimate URI, so when an administrator next loads the Control Panel their browser executes the attacker's JS, which reads window.Craft.csrfTokenValue and POSTs to /admin/actions/plugins/install-plugin for RCE. The GitHub Security Advisory walks through these mechanics, but no standalone weaponized PoC has been published.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 19, 2026

Server-Side Request Forgery and arbitrary JavaScript injection in Craft CMS 4.x (before 4.18) and 5.x (before 5.10) allow remote unauthenticated attackers to poison the Host or X-Forwarded-Host header against the /actions/app/resource-js endpoint, forcing the backend Guzzle client to proxy attacker-controlled content as application/javascript. When the instance sits behind a caching layer, this chains into web cache poisoning, stored XSS in the Control Panel, and 1-click RCE via session-riding the plugin install action. No public exploit identified at time of analysis, though the GitHub Security Advisory (GHSA-c55v-343g-5xff) provides detailed exploitation mechanics.

RemediationAI

Vendor-released patch: upgrade to Craft CMS 5.10 (5.x branch) or 4.18 (4.x branch), which remove actionResourceJs() entirely and instead load cross-domain script tags directly in the browser rather than via a server-side proxy (see PR https://github.com/craftcms/cms/pull/18559 and advisory https://github.com/craftcms/cms/security/advisories/GHSA-c55v-343g-5xff). If immediate upgrade is not possible, set assetManager.cacheSourcePaths to true so the vulnerable HTTP-fetch branch is never reached (trade-off: source paths must be recomputed/cached, which may impact initial CP load on large asset volumes), and explicitly set config/general.php $trustedHosts to your real public hostnames instead of relying on the default 'any' (trade-off: misconfiguration here can break legitimate URL generation behind load balancers). At the cache layer, vary or exclude /actions/app/resource-js from shared caches and strip incoming X-Forwarded-Host headers from untrusted clients.

Affected Packages

composer craftcms/cms fix: 4.18, 5.10

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in composer

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The flaw lives in craft\controllers\AppController::actionResourceJs() and is rooted in Yii2 trust-boundary handling (CWE-346, Origin Validation Error). Craft's default GeneralConfig::$trustedHosts is set to ['any'], which causes Yii2 to honor an attacker-supplied X-Forwarded-Host header and globally rewrite $baseUrl. The endpoint's str_starts_with($url, $baseUrl) check is then trivially satisfied because $baseUrl itself was poisoned, and Craft::createGuzzleClient()->get($url) fetches the resulting URL with ALLOW_REDIRECTS enabled before returning the body via asRaw() with a forced Content-Type: application/javascript header. CPE pkg:composer/craftcms_cms covers all 4.x and 5.x release branches up to the fixes. The vulnerability only manifests on instances where assetManager.cacheSourcePaths is set to false, which disables source-path caching and forces the HTTP fetch branch.

Know when Nginx gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/craftcms/cms) PRIMARY 6.9 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
vuln.today AI 8.3 HIGH

Network-reachable and unauthenticated (AV:N/PR:N) but requires non-default cacheSourcePaths=false plus a shared cache and admin login (AC:H/UI:R); attacker JS executes in admin's browser crossing trust boundaries (S:C) enabling RCE.

3.1 AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H
4.0 AV:N/AC:H/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (https://github.com/craftcms/cms).

CVSS VectorVendor: https://github.com/craftcms/cms

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

1
CVSS changed
Jul 02, 2026 - 00:22 NVD
6.9 (MEDIUM)

DescriptionCVE.org

1. Overview

Craft CMS is vulnerable to Server-Side Request Forgery (SSRF) and Arbitrary JavaScript Injection through the /actions/app/resource-js endpoint. By exploiting the default permissive trustedHosts configuration, an attacker can poison the Host or X-Forwarded-Host header to manipulate the application’s $baseUrl. This bypasses the endpoint’s internal URL validation, forcing the backend Guzzle client to fetch a malicious payload from an attacker-controlled server and reflect it to the client with a Content-Type: application/javascript header.

2. Vulnerability Mechanism (Root Cause) The vulnerability manifests when assetManager.cacheSourcePaths is set to false. The attack chain relies on three structural flaws and insecure defaults:

  • A. Default Proxy Trust (trustedHosts): Craft’s default GeneralConfig::$trustedHosts is set to ['any']. This allows an attacker to bypass front-end web server (Nginx/Apache) strict Host header validations by simply injecting an X-Forwarded-Host header. Yii2 will parse this and globally set $baseUrl to the attacker's domain.
  • B. Insecure HTTP Client (actionResourceJs): In AppController::actionResourceJs(), the str_starts_with($url, $baseUrl) validation is bypassed because $baseUrl is already poisoned by the attacker. The core then uses Craft::createGuzzleClient()->get($url). Unlike the GraphQL Asset fetcher, this Guzzle instance defaults to ALLOW_REDIRECTS => true.
  • C. Forced JS Content-Type: The response fetched from the attacker's server is blindly returned to the user via $this->asRaw() with the header Content-Type: application/javascript.

3. Attack Scenario & Impact (Proof of Exploitability) This endpoint acts as a proxy, taking remote, unverified content and serving it as valid JavaScript. While the direct SSRF allows for internal network probing, the most devastating impact occurs when caching layers are involved.

If the Craft CMS instance is behind a caching layer, this vulnerability leads directly to Web Cache Poisoning:

  1. An unauthenticated attacker sends the poisoned request.
  2. The caching layer caches the malicious JavaScript response for the legitimate /actions/app/resource-js URI.
  3. When an authenticated Administrator logs into the Control Panel, their browser loads the poisoned cached JavaScript (Stored XSS).
  4. The malicious script extracts window.Craft.csrfTokenValue and silently sends a POST request to /admin/actions/plugins/install-plugin, achieving 1-Click Remote Code Execution (RCE) via Session Riding.

Executive ViewAI

Why It Matters

Craft CMS instances running versions 4.x and 5.x are exposed to a critical vulnerability that allows unauthenticated attackers to inject persistent malicious code into cached responses, compromising administrator credentials and enabling complete platform takeover. Organizations dependent on Craft for content or commerce operations face potential data breaches, operational shutdown, and regulatory exposure if unpatched.

Business Impact: Severe
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.3%
Top 75% exploitable
Threat Intel
1
1 source
Data Quality
4 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Out-of-Cycle
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
Very High

Priority Score

34
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

Server-Side Request Forgery exploits applications that fetch remote resources based on user-supplied URLs.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

Affected Products (CPE)CVE.org

pkg:composer/craftcms_cms
pkg:composer/craftcms_cms

More in Nginx

View all
CVE-2023-44487 HIGH POC
7.5 Oct 10

Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour

CVE-2013-2028 HIGH POC
7.5 Jul 20

The ngx_http_parse_chunked function in http/ngx_http_parse.c in nginx 1.3.9 through 1.4.0 allows remote attackers to cau

CVE-2025-1974 CRITICAL POC
9.8 Mar 25

A critical vulnerability in Kubernetes ingress-nginx controller allows unauthenticated attackers with pod network access

CVE-2013-4547 HIGH POC
7.5 Nov 23

nginx 0.8.41 through 1.4.3 and 1.5.x before 1.5.7 allows remote attackers to bypass intended restrictions via an unescap

CVE-2023-50919 CRITICAL POC
9.8 Jan 12

An issue was discovered on GL.iNet devices before version 4.5.0. Rated critical severity (CVSS 9.8), this vulnerability

CVE-2017-7529 HIGH
7.5 Jul 13

Nginx versions since 0.5.6 up to and including 1.13.2 are vulnerable to integer overflow vulnerability in nginx range fi

CVE-2016-0742 HIGH
7.5 Feb 15

The resolver in nginx before 1.8.1 and 1.9.x before 1.9.10 allows remote attackers to cause a denial of service (invalid

CVE-2025-1098 HIGH POC
8.8 Mar 25

Kubernetes ingress-nginx contains a configuration injection vulnerability via the mirror-target and mirror-host Ingress

CVE-2025-24514 HIGH POC
8.8 Mar 25

A security issue was discovered in ingress-nginx https://github.com/kubernetes/ingress-nginx where the `auth-url` Ingres

CVE-2025-1097 HIGH POC
8.8 Mar 25

A security issue was discovered in ingress-nginx https://github.com/kubernetes/ingress-nginx where the `auth-tls-match-c

CVE-2022-31137 CRITICAL POC
9.8 Jul 08

Roxy-WI is a web interface for managing Haproxy, Nginx, Apache and Keepalived servers. Rated critical severity (CVSS 9.8

CVE-2014-3556 MEDIUM
6.8 Dec 29

The STARTTLS implementation in mail/ngx_mail_smtp_handler.c in the SMTP proxy in nginx 1.5.x and 1.6.x before 1.6.1 and

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy