Исправление для CVE-2026-123339 (GHSA-wg5q-m2ww-f3c9) восстанавливает контекст маршрутизатора основного запроса после встроенного фрагмента, но причина этой проблемы все еще существует. Страница может отображать встроенный фрагмент с render() в Twig или с тегом ESI, когда кэш шлюза не используется. Пока фрагмент работает, SubRequestHandler добавляет 127.0.0.1 к доверенным прокси каждого запроса.
Код, который считывает основной запрос в течение этого времени, доверяет заголовкам X-Forwarded-* и Forwarded, если основной запрос поступил от 127.0.0.1. Сам Symfony считывает там основной запрос: - asset() принимает базовый путь и схему основного запроса. С X-Forwarded-Prefix: //evil.example, asset('build/app.js') возвращает //evil.example/build/app.js, скрипт, загруженный с другого хоста.
Request::getBasePath() сохраняет свой первый результат, поэтому, когда он впервые вычисляется внутри фрагмента, более поздние вызовы asset() страницы также возвращают такой URLs. - absolute_url() в Twig, через UrlHelper, принимает хост и схему основного запроса от X-Forwarded-Host и X-Forwarded-Proto. Когда общий кэш хранит страницу, каждый посетитель получает эти URLs. С asset() страница затем запускает скрипты с хоста, выбранного атакующим.
Это влияет на приложения, достигаемые через HTTP от 127.0.0.1, когда этот адрес не является доверенным прокси. Это случай терминатора TLS, обратного прокси или кэша HTTP, работающего на том же хосте. Если framework.trusted_proxies не настроен, что по умолчанию, каждый переадресованный заголовок будет доверен в этом окне, включая X-Forwarded-Prefix.
Настройка framework.trusted_hosts не помогает с asset(), так как префикс не является хостом. Приложения, которые получают запросы непосредственно через php-fpm или mod_php, не затрагиваются, как и те, которые стоят за прокси на другом хосте. REMOTE_ADDR не является 127.0.0.1. SubRequestHandler больше не меняет надежные прокси каждого запроса. Только запросы, которые он создает, и запросы, скопированные с них, доверяют 127.0.0.1.
Пока фрагмент рендерится, основной запрос продолжает игнорировать переадресованные заголовки, отправленные клиентом. symfony/http-ядро теперь требует версию symfony/http-foundation, которая содержит это исправление.
Показать оригинальное описание (EN)
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.
Характеристики атаки
Последствия
Строка CVSS v4.0