GHSA-87pf-7x99-5xc4 Silverstripe Hostname, IP and Protocol Spoofing through HTTP Headers

Not scored Published

Attackers can spoof HTTP headers to bypass SSL enforcement and IP restrictions in SilverStripe, requiring configuration changes to mitigate.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is GHSA-87pf-7x99-5xc4?

GHSA-87pf-7x99-5xc4 is a vulnerability in silverstripe/framework, published on 23 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

In it's default configuration, SilverStripe trusts all originating IPs to include HTTP headers for Hostname, IP and Protocol. This enables reverse proxies to forward requests while still retaining the original request information. Trusted IPs can be limited via the SS_TRUSTED_PROXY_IPS constant. Even with this restriction in place, SilverStripe trusts a variety of HTTP headers due to different proxy notations (e.g. X-Forwarded-For vs. Client-IP). Unless a proxy explicitly unsets invalid HTTP headers from connecting clients, this can lead to spoofing requests being passed through trusted proxies.

The impact of spoofed headers can include Director::forceSSL() not being enforced, SS_HTTPRequest->getIP() returning a wrong IP (disabling any IP restrictions), and spoofed hostnames circumventing any hostname-specific restrictions enforced in SilverStripe Controllers.

Regardless on running a reverse proxy in your hosting infrastructure, please follow the instructions on Secure Coding: Request hostname forgery in order to opt-in to these protections. If your website is not behind a reverse proxy, you might already be protected if using Apache with mod_env enabled, and you have the following line in your .htaccess file: SetEnv BlockUntrustedIPs true.

Which versions are affected by GHSA-87pf-7x99-5xc4?

6 open source packages ship an affected version, including silverstripe/framework.

PackageAffectedFixed in
silverstripe/framework PackagistAll versions3.1.17
silverstripe/framework PackagistAll versions3.1.17
silverstripe/framework PackagistFrom 3.2.03.2.2
silverstripe/framework PackagistFrom 3.2.03.2.2
silverstripe/framework PackagistFrom 3.3.0-beta13.3.0
silverstripe/framework PackagistFrom 3.3.0-beta13.3.0

How do I fix GHSA-87pf-7x99-5xc4?

Upgrade silverstripe/framework to a fixed version for your release line: 3.1.17, 3.2.2 or 3.3.0.

Is GHSA-87pf-7x99-5xc4 being exploited?

There is no known exploitation of GHSA-87pf-7x99-5xc4 in the wild and no public exploit code.

Sources

Is GHSA-87pf-7x99-5xc4 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free