CVE-2026-55791

Craft CMS: Blind SSRF and Arbitrary JavaScript Injection via Host Header Poisoning in actionResourceJs

Published Jul 1, 2026 CVSS 4.0 · 6.9 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical 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.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update to Craft CMS 4.18.0 or later, or 5.10.0 or later, or restrict the trustedHosts configuration to only authorized domains 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 August 1, 2026 at 22:20 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
Type Values Removed Values Added
First Time appeared Craftcms
Craftcms craftcms
Vendors & Products Craftcms
Craftcms craftcms
Type Values Removed Values Added
Metrics ssvc

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

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'}

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)

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 2, 2026, 3:54 PM
Reserved
Jun 17, 2026, 2:40 PM
Status
Deferred
Published
Jul 2, 2026, 12:16 AM
Modified
Oct 25, 2026, 9:10 PM