{"id":"CVE-2026-41130","aliases":["CVE-2026-41130","GHSA-95wr-3f2v-v2wh"],"related":[],"kind":"vulnerability","state":"published","title":"Craft CMS has a host header injection leading to SSRF via resource-js endpoint","summary":"Craft CMS is a content management system (CMS). In versions on the 4.x branch through 4.17.8 and the 5.x branch through 5.9.14, the `resource-js` endpoint in Craft CMS allows unauthenticated requests to proxy remote JavaScript resources. \nWhen `trustedHosts` is not explicitly restricted (default configuration), the application trusts the client-supplied Host header. This allows an attacker to control the derived `baseUrl`, which is used in prefix validation inside `actionResourceJs()`. By supplying a malicious Host header, the attacker can make the server issue arbitrary HTTP requests, leading to Server-Side Request Forgery (SSRF). Versions 4.17.9 and 5.9.15 patch the issue.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Craft CMS is a content management system (CMS). In versions on the 4.x branch through 4.17.8 and the 5.x branch through 5.9.14, the `resource-js` endpoint in Craft CMS allows unauthenticated requests to proxy remote JavaScript resources. \nWhen `trustedHosts` is not explicitly restricted (default configuration), the application trusts the client-supplied Host header. This allows an attacker to control the derived `baseUrl`, which is used in prefix validation inside `actionResourceJs()`. By supplying a malicious Host header, the attacker can make the server issue arbitrary HTTP requests, leading to Server-Side Request Forgery (SSRF). Versions 4.17.9 and 5.9.15 patch the issue.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nThe `resource-js` endpoint in Craft CMS allows unauthenticated requests to proxy remote JavaScript resources. \nWhen `trustedHosts` is not explicitly restricted (default configuration), the application trusts the client-supplied Host header. \n\nThis allows an attacker to control the derived `baseUrl`, which is used in prefix validation inside `actionResourceJs()`. \nBy supplying a malicious Host header, the attacker can make the server issue arbitrary HTTP requests, leading to Server-Side Request Forgery (SSRF).\n\n### Details\n\nThe vulnerability exists in `AppController::actionResourceJs()`.\n\nThe function validates that the `url` parameter starts with `assetManager->baseUrl`. However, `baseUrl` is derived from the current request host. If `trustedHosts` is not configured, the Host header is fully attacker-controlled.\n\nAttack chain:\n\n1. Attacker sends request with controlled `Host` header.\n2. Application derives `baseUrl` from the malicious Host.\n3. `url` parameter is required to start with this `baseUrl`.\n4. Validation passes.\n5. Guzzle performs a server-side HTTP request to the attacker-controlled host.\n6. SSRF occurs.\n\nThis does not rely on string parsing bypass. It relies on Host header trust.\n\n### PoC (safe reproduction steps)\n\nEnvironment:\n- Craft CMS 5.9.12\n- Default configuration (no trustedHosts restriction)\n- Docker deployment\n\n1. Start a listener inside the container:\n   python3 -m http.server 9999\n\n2. Send a request to resource-js with a controlled Host header.\n\n3. Observe that the internal listener receives a request (OOB confirmation).","format":"markdown","source":"ghsa"},{"lang":"es","text":"Craft CMS es un sistema de gestión de contenido (CMS). En las versiones de la rama 4.x hasta la 4.17.8 y de la rama 5.x hasta la 5.9.14, el endpoint ’resource-js’ en Craft CMS permite peticiones no autenticadas para hacer proxy de recursos JavaScript remotos. Cuando ’trustedHosts’ no está explícitamente restringido (configuración por defecto), la aplicación confía en el encabezado Host proporcionado por el cliente. Esto permite a un atacante controlar la ’baseUrl’ derivada, que se utiliza en la validación de prefijos dentro de ’actionResourceJs()’. Al proporcionar un encabezado Host malicioso, el atacante puede hacer que el servidor emita peticiones HTTP arbitrarias, lo que lleva a la falsificación de petición del lado del servidor (SSRF). Las versiones 4.17.9 y 5.9.15 aplican un parche al problema.","source":"nvd"}],"published":"2026-04-14T23:36:09.000Z","modified":"2026-10-26T21:10:00.170Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N/E:P","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N/E:P","score":5.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N/E:P","rating":"MEDIUM"}],"cwes":["CWE-918"],"affected":[{"ranges":[{"version":">= 5.0.0-RC1, < 5.9.15","status":"affected"},{"version":">= 4.0.0-RC1, < 4.17.9","status":"affected"}],"vendor":"craftcms","product":"cms","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"5.0.0-RC1","status":"affected","fixed":"5.9.15"}],"ecosystem":"Packagist","package":"craftcms/cms","purl":"pkg:composer/craftcms/cms","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"4.0.0-RC1","status":"affected","fixed":"4.17.9"}],"ecosystem":"Packagist","package":"craftcms/cms","purl":"pkg:composer/craftcms/cms","source":"ghsa"}],"references":[{"url":"https://github.com/craftcms/cms/security/advisories/GHSA-95wr-3f2v-v2wh","tags":["exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/craftcms/cms/commit/ebe7e85f1c89700d64332f72492be2e9a594e783","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-41130","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/craftcms/cms","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2026-04-22T14:18:44.834Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-41130","url":"https://www.cve.org/CVERecord?id=CVE-2026-41130","licence":"CVE Terms of Use","modified":"2026-04-22T14:18:56.067Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-95wr-3f2v-v2wh","url":"https://github.com/advisories/GHSA-95wr-3f2v-v2wh","licence":"CC-BY-4.0","modified":"2026-05-05T16:11:51.690Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-41130","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-41130","licence":"Public domain","modified":"2026-10-26T21:10:00.170Z"}],"updatedAt":"2026-11-25T22:59:19.217Z","epss":{"score":0.00937,"percentile":0.61859,"date":"2026-12-01T12:00:22.000Z"}}