Medium · published September 26, 2026
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.
| Product | Versions | Fixed in |
|---|---|---|
| php/php | ≥ 8.2.0, < 8.2.34 | 8.2.34 |
| php/php | ≥ 8.3.0, < 8.3.35 | 8.3.35 |
| php/php | ≥ 8.4.0, < 8.4.26 | 8.4.26 |
| php/php | ≥ 8.5.0, < 8.5.11 | 8.5.11 |