CVE-2026-55791 — Vulnerability in craftcms/cms — CVE Details
Craft CMS: Blind SSRF and Arbitrary JavaScript Injection via Host Header Poisoning in actionResourceJs
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.46%). Schedule for your next planned update.
Does your project use an affected craftcms/cms version?
Paste your composer.lock to check it for CVE-2026-55791 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
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 defaultGeneralConfig::$trustedHostsis set to['any']. This allows an attacker to bypass front-end web server (Nginx/Apache) strictHostheader validations by simply injecting anX-Forwarded-Hostheader. Yii2 will parse this and globally set$baseUrlto the attacker's domain. - B. Insecure HTTP Client (
actionResourceJs): InAppController::actionResourceJs(), thestr_starts_with($url, $baseUrl)validation is bypassed because$baseUrlis already poisoned by the attacker. The core then usesCraft::createGuzzleClient()->get($url). Unlike the GraphQL Asset fetcher, this Guzzle instance defaults toALLOW_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 headerContent-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:
- An unauthenticated attacker sends the poisoned request.
- The caching layer caches the malicious JavaScript response for the legitimate
/actions/app/resource-jsURI. - When an authenticated Administrator logs into the Control Panel, their browser loads the poisoned cached JavaScript (Stored XSS).
- The malicious script extracts
window.Craft.csrfTokenValueand silently sends a POST request to/admin/actions/plugins/install-plugin, achieving 1-Click Remote Code Execution (RCE) via Session Riding.
Advisory Timeline
- First published June 19, 2026 (160 days ago).
- Last revised September 10, 2026 — 82 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
composer require "craftcms/cms:^5.10"
composer require "craftcms/cms:^4.18"
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (2)
Affects 1 ecosystem: Packagist (1).
| Package | Fixed In |
|---|---|
| craftcms/cms Packagist · Affected: 5.0.0, 5.0.0-RC1, 5.0.1, 5.0.2 (+167 more) | 5.10 |
| craftcms/cms Packagist · Affected: 4.0.0, 4.0.0-RC1, 4.0.0-RC2, 4.0.0-RC3 (+245 more) | 4.18 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-346Origin Validation ErrorMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 10.0 score means for each attack dimension.
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:L/SI:N/SA:N
References
Frequently Asked Questions
- What is CVE-2026-55791?
- Craft CMS: Blind SSRF and Arbitrary JavaScript Injection via Host Header Poisoning in actionResourceJs. This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 10.0/10).
- How do I check if my project is affected by CVE-2026-55791?
- CVE-2026-55791 affects craftcms/cms. It has a 0.5% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-55791 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Maximum impact if exploited, often with little effort or access required.
This is a below-median EPSS score — only 32.2% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2024-56145CRITICAL
Craft CMS has potential RCE when PHP `register_argc_argv` config setting is enabled
- CVE-2023-41892CRITICAL
Craft CMS Remote Code Execution vulnerability
- CVE-2025-32432CRITICAL
Craft CMS Allows Remote Code Execution
- CVE-2026-29069HIGH
Craft CMS has unauthenticated activation email trigger with potential user enumeration
- CVE-2026-25495HIGH
Craft CMS Vulnerable to SQL Injection in Element Indexes via `criteria[orderBy]`
- CVE-2026-72778HIGH
Craft CMS: Authenticated RCE via `condition.config` JSON cleanse bypass
- CVE-2026-32267HIGH
Craft CMS Vulnerable to Privilege Escalation/Bypass through UsersController->actionImpersonateWithToken()
- CVE-2025-68454MEDIUM
Craft CMS vulnerable to potential authenticated Remote Code Execution via Twig SSTI