REDHAT-BUG-2541615: Medium severity PHP PHP vulnerability
When the HTTP stream wrapper follows a redirect and the response carries a Location header with an empty value, the redirect code reads one byte past the end of the heap buffer holding the location. The value of that out-of-bounds byte decides which redirect target is built, so a malicious server controls whether the client is sent to the host root or to the current directory.
Affected Software
Event History
Frequently Asked Questions
Who is exposed to this issue?
PHP clients using the HTTP stream wrapper are exposed when they follow redirects from a malicious or attacker-controlled HTTP server that returns a Location header with an empty value.
What must an attacker do to trigger the issue?
The attacker needs to cause the PHP HTTP stream wrapper to follow a redirect response whose Location header has an empty value. The out-of-bounds byte then influences whether the resulting redirect target resolves to the host root or the current directory.
What is the practical impact of exploitation?
A malicious server can influence the redirect destination constructed by the client, causing it to target either the host root or the current directory. The provided information does not establish further impacts beyond this redirect-target manipulation.