CVE-2026-55791: CWE-918: Server-Side Request Forgery (SSRF) in craftcms cms
Craft 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, contain a Server-Side Request Forgery (SSRF) vulnerability via the /actions/app/resource-js endpoint. This occurs when the default trustedHosts configuration is permissive and assetManager.cacheSourcePaths is set to false. An attacker can manipulate Host or X-Forwarded-Host headers to bypass URL validation, causing the backend to fetch malicious JavaScript from an attacker-controlled server and deliver it to clients. The issue has been fixed in versions 4.18.0 and 5.10.0.
AI Analysis
Technical Summary
Craft CMS is affected by a Server-Side Request Forgery (SSRF) vulnerability combined with arbitrary JavaScript injection through the /actions/app/resource-js endpoint. The vulnerability arises from a permissive trustedHosts configuration that allows an attacker to poison the Host or X-Forwarded-Host headers, manipulating the application’s $baseUrl. This manipulation bypasses internal URL validation, causing the backend Guzzle HTTP client to fetch malicious payloads from attacker-controlled servers. When assetManager.cacheSourcePaths is false, the malicious JavaScript is reflected to clients with a Content-Type: application/javascript header, enabling injection. The vulnerability affects Craft CMS versions from 4.0.0-RC1 up to but not including 4.18.0, and from 5.0.0-RC1 up to but not including 5.10.0. The issue has been fixed in versions 4.18.0 and 5.10.0.
Potential Impact
An unauthenticated attacker can exploit this vulnerability to cause the server to make arbitrary HTTP requests to attacker-controlled servers, resulting in Server-Side Request Forgery. Additionally, the attacker can inject arbitrary JavaScript into responses delivered to clients, potentially leading to client-side script execution. This can undermine the integrity of client interactions with the CMS and may facilitate further attacks. The CVSS 4.0 base score is 6.9 (medium severity), indicating a moderate risk without requiring authentication or user interaction.
Mitigation Recommendations
This vulnerability has been fixed in Craft CMS versions 4.18.0 and 5.10.0. Users should upgrade to these or later versions to remediate the issue. Until upgrading, review and restrict the trustedHosts configuration to prevent header poisoning and avoid setting assetManager.cacheSourcePaths to false. Patch status is not explicitly stated beyond the fixed versions; therefore, verify with the official vendor advisory for the latest remediation guidance.
CVE-2026-55791: CWE-918: Server-Side Request Forgery (SSRF) in craftcms cms
Description
Craft 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, contain a Server-Side Request Forgery (SSRF) vulnerability via the /actions/app/resource-js endpoint. This occurs when the default trustedHosts configuration is permissive and assetManager.cacheSourcePaths is set to false. An attacker can manipulate Host or X-Forwarded-Host headers to bypass URL validation, causing the backend to fetch malicious JavaScript from an attacker-controlled server and deliver it to clients. The issue has been fixed in versions 4.18.0 and 5.10.0.
CVSS v4.0
Score 6.9medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Craft CMS is affected by a Server-Side Request Forgery (SSRF) vulnerability combined with arbitrary JavaScript injection through the /actions/app/resource-js endpoint. The vulnerability arises from a permissive trustedHosts configuration that allows an attacker to poison the Host or X-Forwarded-Host headers, manipulating the application’s $baseUrl. This manipulation bypasses internal URL validation, causing the backend Guzzle HTTP client to fetch malicious payloads from attacker-controlled servers. When assetManager.cacheSourcePaths is false, the malicious JavaScript is reflected to clients with a Content-Type: application/javascript header, enabling injection. The vulnerability affects Craft CMS versions from 4.0.0-RC1 up to but not including 4.18.0, and from 5.0.0-RC1 up to but not including 5.10.0. The issue has been fixed in versions 4.18.0 and 5.10.0.
Potential Impact
An unauthenticated attacker can exploit this vulnerability to cause the server to make arbitrary HTTP requests to attacker-controlled servers, resulting in Server-Side Request Forgery. Additionally, the attacker can inject arbitrary JavaScript into responses delivered to clients, potentially leading to client-side script execution. This can undermine the integrity of client interactions with the CMS and may facilitate further attacks. The CVSS 4.0 base score is 6.9 (medium severity), indicating a moderate risk without requiring authentication or user interaction.
Mitigation Recommendations
This vulnerability has been fixed in Craft CMS versions 4.18.0 and 5.10.0. Users should upgrade to these or later versions to remediate the issue. Until upgrading, review and restrict the trustedHosts configuration to prevent header poisoning and avoid setting assetManager.cacheSourcePaths to false. Patch status is not explicitly stated beyond the fixed versions; therefore, verify with the official vendor advisory for the latest remediation guidance.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-06-17T14:40:28.380Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a45a80827e9c797195b4140
Added to database: 07/01/2026, 23:51:36 UTC
Last enriched: 07/02/2026, 00:06:48 UTC
Last updated: 07/02/2026, 00:47:40 UTC
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.