HttpClient Lets the Proxy Header of a Request Choose the Proxy of Outgoing Requests in HTTP Workers That Run Under the CLI SAPI
NIST has received this entry but not started reviewing it.
When the proxy option isn't set, HttpClient takes the proxy from environment variables like http_proxy or HTTP_PROXY. On web servers, it ignores HTTP_PROXY, because PHP puts the Proxy request header there (the httpoxy issue). On the CLI SAPI, it read HTTP_PROXY 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, HTTP_PROXY is now read from the environment with $_ENV and getenv(), never from $_SERVER. Other SAPIs still ignore it.
External Control of System or Configuration Setting CWE-15
One or more system settings or configuration elements can be externally controlled by a user.
Weakness data: MITRE Common Weakness Enumeration.
New to this? Read how to keep your software updated.
The products and versions NIST lists as vulnerable, 2 products in all. If what you run is not listed it is probably not affected, but ask your provider if you are unsure.
| Product | Type | Vulnerable versions | Fixed in |
|---|---|---|---|
| Symfony symfony/http-client | Software | from 4.3.0, before 5.4.57; from 6.0.0, before 6.4.51; from 7.0.0, before 7.4.24; from 8.0.0, before 8.1.12 | 5.4.57; 6.4.51; 7.4.24; 8.1.12 |
| Symfony symfony/symfony | Software | from 4.3.0, before 5.4.57; from 6.0.0, before 6.4.51; from 7.0.0, before 7.4.24; from 8.0.0, before 8.1.12 | 5.4.57; 6.4.51; 7.4.24; 8.1.12 |
The 8.3 severity score (high) from the company that reported it, broken into what it means in practice. Red means it makes the flaw easier or worse.
| How it is reached | Network | Can be attacked from anywhere on the internet, with no need to be near the target. |
| How hard it is | Low | Easy to carry out. No special conditions have to line up. |
| Setup needed on the target | Present | The target has to be set up in a particular way. |
| Login needed | None | The attacker does not need an account or password. |
| Someone has to act | None | Nobody has to click or open anything. It can happen on its own. |
| Data exposed | High | Total loss of confidentiality: the attacker can read all the data the program can reach. |
| Data changed | Low | The attacker can change some data, but not everything. |
| Service disrupted | None | The service keeps running. |
NIST lists 3 sources for this flaw, none tagged as a vendor patch.