VDB
Sign up
HIGH7.2

GHSA-25gq-jvx2-vg9x

Silverstripe X-Forwarded-Host request hostname injection

Quick fix

GHSA-25gq-jvx2-vg9x — silverstripe/framework: upgrade to the fixed version with the command below.

composer require silverstripe/framework:^3.1.13

Details

A potential hostname injection vulnerability has been found which could allow attackers to alter url resolution.

If a request contains the X-Forwarded-Host HTTP header a website would then use its value in place of the actual HTTP hostname. In cases where caching is enabled, this could allow an attacker to potentially embed a remote url as the base_url for any site. This would then cause other visitors to the site to be redirected unknowingly.

This header is necessary for servers running behind a reverse proxy (such as nginx). Such servers are likely not vulnerable to this risk.

A fix has been merged into the default installer, although existing projects which do not run behind a reverse proxy should update their htaccess as below: ``` <IfModule mod_headers.c> # Remove X-Forwarded-Host header sent as a part of any request from the web RequestHeader unset X-Forwarded-Host </IfModule> ```

Are you affected?

Enter the version of the package you're using.

Affected packages

Packagist/silverstripe/framework
Introduced in: 3.1.0Fixed in: 3.1.13
Fixcomposer require silverstripe/framework:^3.1.13

References

Check it before you install it

One call answers whether to add this package: known advisories, CISA KEV, and whether the name is a hallucinated or freshly squatted one. No key needed to try it.

curl -s https://vdb.ai.kr/v1/ai/check-packages \
  -H 'Content-Type: application/json' \
  -d '{"packages":["pkg:composer/silverstripe/framework"]}'