CVE-2026-133743 in Symfonyinfo

Summary

by MITRE • 11/25/2026

The fix for CVE-2026-123339 (GHSA-wg5q-m2ww-f3c9) restores the router context of the main request after an inline fragment, but the cause of that issue is still there. A page can render an inline fragment with render() in Twig, or with an ESI tag when no gateway cache is used. While the fragment runs, SubRequestHandler adds 127.0.0.1 to the trusted proxies of every request. Code that reads the main request during that time trusts its X-Forwarded-* and Forwarded headers if the main request came from 127.0.0.1.

Symfony itself reads the main request there: - asset() takes the base path and the scheme of the main request. With X-Forwarded-Prefix: //evil.example, asset('build/app.js') returns //evil.example/build/app.js, a script loaded from another host. Request::getBasePath() keeps its first result, so when it's first computed inside the fragment, the later asset() calls of the page return such URLs too. - absolute_url() in Twig, through UrlHelper, takes the host and the scheme of the main request from X-Forwarded-Host and X-Forwarded-Proto.

When a shared cache stores the page, every visitor gets these URLs. With asset(), the page then runs scripts from a host chosen by the attacker.

This affects applications reached over HTTP from 127.0.0.1 when that address isn't a trusted proxy. That's the case behind a TLS terminator, a reverse proxy or an HTTP cache running on the same host. When framework.trusted_proxies is not configured, which is the default, every forwarded header is trusted during that window, X-Forwarded-Prefix included. Configuring framework.trusted_hosts doesn't help with asset(), since the prefix is not a host. Applications that get requests directly through php-fpm or mod_php are not affected, and neither are those behind a proxy on another host. REMOTE_ADDR is not 127.0.0.1 there.

SubRequestHandler doesn't change the trusted proxies of every request anymore. Only the requests it builds, and the requests copied from them, trust 127.0.0.1. While a fragment renders, the main request keeps ignoring the forwarded headers sent by the client.

symfony/http-kernel now requires the version of symfony/http-foundation that contains this fix.

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Analysis

by VulDB Data Team • 11/25/2026

The vulnerability identified as CVE-2026-123339 represents a sophisticated server-side request forgery and cross-site scripting vector inherent to how Symfony handles subrequests within its HTTP kernel, specifically when inline fragments are rendered without an external gateway cache. The core technical flaw stems from the behavior of SubRequestHandler during the execution of these fragments. When a page renders an inline fragment using Twig's render function or ESI tags in environments lacking a dedicated gateway cache, the framework temporarily modifies the trusted proxy configuration for all requests by adding 127.0.0.1 to the list of trusted proxies. This modification creates a window where code executing within the context of the main request can inadvertently trust forwarded headers originating from that local loopback address during the fragment's execution phase.

The operational impact is severe because it allows an attacker who controls or influences the X-Forwarded-* and Forwarded headers sent by a client to manipulate how the server interprets the origin and base path of requests, provided the application receives traffic via HTTP from 127.0.0.1 on a trusted proxy setup such as a TLS terminator, reverse proxy, or local HTTP cache. Specifically, functions like asset() in Twig rely on the main request's scheme and base path to generate URLs for static assets. If an attacker sends X-Forwarded-Prefix: //evil.example, the asset function may return a script URL pointing to that malicious domain rather than the legitimate application host. Similarly, absolute_url calls via UrlHelper can be manipulated using X-Forwarded-Host and X-Forwarded-Proto headers to construct URLs with incorrect hosts or protocols.

This issue is particularly dangerous in cached environments because once these malformed URLs are generated and stored by a shared cache, every subsequent visitor loading the page will have scripts loaded from the attacker-controlled domain. This effectively facilitates persistent cross-site scripting attacks without requiring direct user interaction beyond visiting the compromised page. The vulnerability specifically targets applications where framework.trusted_proxies is not explicitly configured or does not adequately restrict 127.0.0.1, as this default configuration causes every forwarded header to be trusted during the vulnerable window. Applications receiving requests directly through php-fpm or mod_php without a local proxy are unaffected because their REMOTE_ADDR will not be 127.0.0.1 in the same manner, and applications behind proxies on different hosts also remain safe as the loopback address is not involved in the request chain.

The root cause lies in the overly broad scope of trusted proxy modifications applied by SubRequestHandler during fragment rendering. While a fix has been implemented to restore the router context after an inline fragment completes, the underlying architectural flaw remains: the main request continues to trust forwarded headers if it was initially accessed from 127.0.0.1 and no gateway cache is present. The mitigation involves ensuring that SubRequestHandler does not alter the trusted proxies of every request indiscriminately but instead restricts this behavior only to the specific subrequests being built or copied, thereby preventing the main request from inheriting untrusted forwarded header values during fragment execution.

To mitigate this vulnerability, administrators must ensure they are running symfony/http-kernel versions that require the patched version of symfony/http-foundation where SubRequestHandler no longer modifies trusted proxies for all requests globally. Additionally, it is critical to explicitly configure framework.trusted_proxies in application settings rather than relying on defaults, ensuring that 127.0.0.1 is not inadvertently treated as a fully trusted proxy capable of spoofing host and path information via forwarded headers. This configuration change prevents the server from accepting manipulated X-Forwarded-* values for critical URL generation functions like asset() and absolute_url(), thereby neutralizing the attack vector even if fragment rendering occurs locally.

From an industry standards perspective, this vulnerability aligns with CWE-94 Improper Control of Generation of Code (Code Injection) due to the potential execution of attacker-controlled scripts via manipulated URLs, as well as CWE-200 Exposure of Sensitive Information through Data Queries if sensitive paths are exposed. In terms of MITRE ATT&CK techniques, this scenario maps closely to T1589 Gather Victim Identity Information and potentially T1190 Exploit Public-Facing Application, where the attacker leverages header manipulation in a web application context to achieve code execution or phishing via malicious script injection. The failure lies primarily in improper validation of input data (forwarded headers) relative to the trust boundary established by proxy configurations, highlighting the importance of strict adherence to secure coding practices regarding HTTP header handling and proxy trust models.

Responsible

Symfony

Reservation

11/20/2026

Disclosure

11/25/2026

Moderation

accepted

CPE

ready

EPSS

0.00346

KEV

no

Activities

very low

Sources

Might our Artificial Intelligence support you?

Check our Alexa App!