CVE-2026-134792: HttpClient Lets the Proxy Header of a Request Choose the Proxy of Outgoing Requests in HTTP Workers That Run Under the CLI SAPI
When the proxy option isn't set, HttpClient takes the proxy from environment variables like httpproxy or HTTPPROXY. On web servers, it ignores HTTPPROXY, because PHP puts the Proxy request header there (the httpoxy issue). On the CLI SAPI, it read HTTPPROXY from $SERVER, where PHP also puts the environment.
HTTP workers that run under the CLI SAPI put the headers of each request in $SERVER too. This is the case of spiral/roadrunner-http, which the RoadRunner runner of php-runtime uses, and of baldinof/roadrunner-bundle and php-pm. A client could then send a Proxy header to choose the proxy of the requests that the application sent while handling its request. That proxy received the full requests to http:// URLs, with their credentials, and could forge the responses. For https:// URLs, it learned the host and port through CONNECT.
NativeHttpClient is affected since Symfony 4.3.0, AmpHttpClient since 5.1.0, and CurlHttpClient since 4.4.40, 5.4.7 and 6.0.7.
On the CLI SAPI, HTTPPROXY is now read from the environment with $ENV and getenv(), never from $SERVER. Other SAPIs still ignore it.
Affected Software
Event History
Frequently Asked Questions
Which deployments are exposed to request-controlled proxy selection?
Exposure requires an HTTP worker running under PHP's CLI SAPI that places request headers in $_SERVER. The data identifies spiral/roadrunner-http, the RoadRunner runner of php-runtime, baldinof/roadrunner-bundle, and php-pm as affected worker environments.
What must be true for an attacker to influence outbound requests?
The application must make outbound requests without explicitly setting the proxy option while handling an attacker request. The attacker can then supply a Proxy header, causing HTTP_PROXY in $_SERVER to select the proxy used for those outbound requests.
What can the attacker gain from successful exploitation?
For outbound http:// requests, the attacker-controlled proxy receives the full request, including credentials, and can forge responses. For https:// requests, the proxy learns the destination host and port through CONNECT.
Which client versions are within the affected ranges?
NativeHttpClient is affected since Symfony 4.3.0, AmpHttpClient since 5.1.0, and CurlHttpClient since 4.4.40, 5.4.7, and 6.0.7. The issue is specific to CLI SAPI handling; other SAPIs continue to ignore HTTP_PROXY.