{"id":"GHSA-25gq-jvx2-vg9x","aliases":[],"status":"published","title":"Silverstripe X-Forwarded-Host request hostname injection","description":"A potential hostname injection vulnerability has been found which could allow attackers to alter url resolution.\n\nIf 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.\n\nThis header is necessary for servers running behind a reverse proxy (such as nginx). Such servers are likely not vulnerable to this risk.\n\nA 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:\n```\n\u003cIfModule mod_headers.c\u003e\n    # Remove X-Forwarded-Host header sent as a part of any request from the web\n    RequestHeader unset X-Forwarded-Host\n\u003c/IfModule\u003e\n```","severity":{"version":"3.1","score":7.2,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N","level":"high","from":"ghsa"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-601"],"published":"2024-05-23T16:59:25Z","modified":"2024-11-28T05:40:39Z","fixes":[{"ecosystem":"Packagist","package":"silverstripe/framework","fixed_in":["3.1.13"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"Packagist","package":"silverstripe/framework","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.1.0"},{"fixed":"3.1.13"}]}]},{"source":"osv","ecosystem":"Packagist","package":"silverstripe/framework","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.1.0"},{"fixed":"3.1.13"}]}],"versions":["3.1.0","3.1.1","3.1.10","3.1.10-rc1","3.1.10-rc2","3.1.11","3.1.11-rc1","3.1.12","3.1.13-rc1","3.1.2","3.1.2-rc1","3.1.3","3.1.3-rc1","3.1.3-rc2","3.1.4","3.1.4-rc1","3.1.5","3.1.5-rc1","3.1.6","3.1.6-rc1","3.1.6-rc2","3.1.6-rc3","3.1.7","3.1.7-rc1","3.1.8","3.1.9","3.1.9-rc1"]}],"references":[{"url":"https://github.com/silverstripe/silverstripe-framework/commit/75137dbab28c0efd28b07e50044a50c5af4e46aa","tags":["web"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/silverstripe/framework/SS-2015-013-1.yaml","tags":["web"]},{"url":"https://www.silverstripe.org/software/download/security-releases/ss-2015-013","tags":["web"]},{"url":"https://github.com/advisories/GHSA-25gq-jvx2-vg9x"},{"url":"https://github.com/silverstripe/silverstripe-framework","tags":["package"]}],"sources":{"ghsa":[{"id":"GHSA-25gq-jvx2-vg9x","title":"Silverstripe X-Forwarded-Host request hostname injection","description":"A potential hostname injection vulnerability has been found which could allow attackers to alter url resolution.\n\nIf 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.\n\nThis header is necessary for servers running behind a reverse proxy (such as nginx). Such servers are likely not vulnerable to this risk.\n\nA 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:\n```\n\u003cIfModule mod_headers.c\u003e\n    # Remove X-Forwarded-Host header sent as a part of any request from the web\n    RequestHeader unset X-Forwarded-Host\n\u003c/IfModule\u003e\n```","status":"published","published":"2024-05-23T16:59:25Z","modified":"2024-05-23T16:59:27Z","cvss":[{"version":"3.1","score":7.2,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N","level":"high"}],"cwes":["CWE-601"],"updated_at":"2026-11-02T14:37:51.549437Z"}],"osv":[{"id":"GHSA-25gq-jvx2-vg9x","title":"Silverstripe X-Forwarded-Host request hostname injection","description":"A potential hostname injection vulnerability has been found which could allow attackers to alter url resolution.\n\nIf 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.\n\nThis header is necessary for servers running behind a reverse proxy (such as nginx). Such servers are likely not vulnerable to this risk.\n\nA 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:\n```\n\u003cIfModule mod_headers.c\u003e\n    # Remove X-Forwarded-Host header sent as a part of any request from the web\n    RequestHeader unset X-Forwarded-Host\n\u003c/IfModule\u003e\n```","status":"published","published":"2024-05-23T16:59:25Z","modified":"2024-11-28T05:40:39.913168Z","cvss":[{"version":"3.1","score":7.2,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N","level":"high"}],"cwes":["CWE-601"],"updated_at":"2026-11-02T15:46:33.956911Z"}]}}
