All vulnerabilities

Servers and applications

CVE-2026-41130

Host header injection leads to SSRF via resource-js endpoint

Severity
Medium
Published
13 Apr 2026
Last changed
17 Apr 2026
Added to UpHeron
3 Nov 2026
Fixed in
4.17.9, 5.9.15
Exploit chance
0.3% in the next 30 daysHigher than 24% of CVEs. EPSS by FIRST, 19 Nov 2026
Also known as
GHSA-95wr-3f2v-v2wh
Sources
Project advisories (GitHub)

Description

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

The vulnerability exists in AppController::actionResourceJs().

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

Attack chain:

  • Attacker sends request with controlled Host header.
  • Application derives baseUrl from the malicious Host.
  • url parameter is required to start with this baseUrl.
  • Validation passes.
From craftcms/cms's security advisory. Shortened; the full text is there.

Affected software

SoftwareAffected versions
Craft CMSServers and applications · github:craftcms/cms
  • From 4.0.0-RC1 before 4.17.9
  • From 5.0.0-RC1 before 5.9.15

About Craft CMS

Build bespoke content experiences with Craft.

From its GitHub repository.
Monthly downloads (Packagist)
79,322Packagist, 15 Nov 2026
Total downloads (Packagist)
3,879,755Packagist, 15 Nov 2026
GitHub stars
3,628GitHub, 15 Nov 2026
Forks
713GitHub, 15 Nov 2026
Latest release
5.12.1GitHub, 15 Nov 2026
Released
10 Nov 2026GitHub
First published on GitHub
27 Jan 2017GitHub

Release lines

ReleaseLatestSecurity fixes
55.12.1Until 31 Dec 2031
44.18.9Ended 30 Apr 2026
33.9.15Ended 30 Apr 2024
22.9.2Ended 31 Jan 2022

From endoflife.date.

References