Description
Craft CMS is a content management system (CMS). Versions 4.0.0-RC1 and above, prior to 4.18.0 and 5.0.0-RC1, and above, prior to 5.10.0, are 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. The vulnerability manifests when assetManager.cacheSourcePaths is set to false. This issue has been fixed in versions 4.18.0 and 5.10.0.
Published: 2026-07-01
Score: 6.9 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Craft CMS is a content management system (CMS). Versions 4.0.0‑RC1 and above, prior to 4.18.0 and 5.0.0‑RC1, and above, prior to 5.10.0, are 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. The vulnerability manifests when assetManager.cacheSourcePaths is set to false. This issue has been fixed in versions 4.18.0 and 5.10.0.

Affected Systems

Craft CMS installations of versions 4.0.0‑RC1 through 4.17.x and all 5.x releases prior to 5.10.0 that still use the default permissive trustedHosts configuration are affected. The issue is addressed in Craft CMS 4.18.0 and 5.10.0.

Risk and Exploitability

The CVSS base score of 6.9 indicates moderate severity, and the EPSS score of less than 1% suggests a low but non‑zero likelihood of exploitation. This vulnerability is not listed in the CISA KEV catalog. Attack vectors are likely via crafted Host or X‑Forwarded‑Host headers, and exploitation can be performed remotely without authentication, enabling an attacker to inject arbitrary JavaScript into visitors to the site and engage in blind SSRF to internal resources.

Generated by OpenCVE AI on July 21, 2026 at 12:43 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Craft CMS to version 4.18.0 or later, or 5.10.0 or later.
  • Restrict the trustedHosts configuration to only your own domain(s) to eliminate the permissive host list.
  • Set assetManager.cacheSourcePaths to true so that the application performs the intended URL validation.
  • Implement strict validation of Host and X‑Forwarded‑Host headers against an allow list to mitigate Server‑Side Request Forgery.

Generated by OpenCVE AI on July 21, 2026 at 12:43 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-c55v-343g-5xff Craft CMS: Blind SSRF and Arbitrary JavaScript Injection via Host Header Poisoning in actionResourceJs
History

Thu, 02 Jul 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Wed, 01 Jul 2026 23:45:00 +0000

Type Values Removed Values Added
Description Craft CMS is a content management system (CMS). Versions 4.0.0-RC1 and above, prior to 4.18.0 and 5.0.0-RC1, and above, prior to 5.10.0, are 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. The vulnerability manifests when assetManager.cacheSourcePaths is set to false. This issue has been fixed in versions 4.18.0 and 5.10.0.
Title Craft CMS: Blind SSRF and Arbitrary JavaScript Injection via Host Header Poisoning in actionResourceJs
Weaknesses CWE-644
CWE-79
CWE-918
References
Metrics cvssV4_0

{'score': 6.9, 'vector': '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'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-02T15:54:26.284Z

Reserved: 2026-06-17T14:40:28.380Z

Link: CVE-2026-55791

cve-icon Vulnrichment

Updated: 2026-07-02T14:53:52.067Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-21T12:45:02Z

Weaknesses
  • CWE-644

    Improper Neutralization of HTTP Headers for Scripting Syntax

  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

  • CWE-918

    Server-Side Request Forgery (SSRF)