Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. craftcms/cms
  4. ›
  5. GHSA-95wr-3f2v-v2wh

GHSA-95wr-3f2v-v2wh: Craft CMS has a host header injection leading to SSRF via resource-js endpoint

April 14, 2026

The resource-js endpoint in Craft CMS allows unauthenticated requests to proxy remote JavaScript resources. When 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).

References

  • github.com/advisories/GHSA-95wr-3f2v-v2wh
  • github.com/craftcms/cms
  • github.com/craftcms/cms/commit/ebe7e85f1c89700d64332f72492be2e9a594e783
  • github.com/craftcms/cms/security/advisories/GHSA-95wr-3f2v-v2wh

Code Behaviors & Features

Detect and mitigate GHSA-95wr-3f2v-v2wh with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 4.0.0-RC1 before 4.17.9, all versions starting from 5.0.0-RC1 before 5.9.15

Fixed versions

  • 5.9.15
  • 4.17.9

Solution

Upgrade to versions 4.17.9, 5.9.15 or above.

Impact 5.5 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-918: Server-Side Request Forgery (SSRF)

Source file

packagist/craftcms/cms/GHSA-95wr-3f2v-v2wh.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 09 May 2026 12:18:10 +0000.