Read the docs

Forwarded headers alter asset and absolute_url URLs in Symfony

Priority LOW 31CWE-348Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Attack requirements
Present
Impact type
—
Confidentiality · integrity · availability
None · Low · None
Fix status
Fixed

Attack profile from CVSS 4.0 · CNA. Fix status from CNA.

Summary

The symfony/http-kernel and symfony/symfony packages from 0 before 5.4.57, from 6.0.0 before 6.4.51, from 7.0.0 before 7.4.24 and from 8.0.0 before 8.1.12 are affected. An earlier incomplete fix left code that reads the main request during an inline fragment trusting forwarded headers from 127.0.0.1, which is the default when trusted proxies are not configured (CWE-348). A remote, unauthenticated attacker can make asset() and absolute_url() return URLs on a host of the attacker's choosing, and a shared cache then serves these URLs to other visitors.

Written with Claude Haiku 5.5 from the sources below · 2026-11-25

Description from the CNA

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.

Why it matters now

EPSS 0.00346 20th percentileScored 2026-11-30
Fix Fixed symfony/http-kernel (Symfony): 5.4.57, 6.4.51, 7.4.24 +1symfony/symfony (Symfony): 5.4.57, 6.4.51, 7.4.24 +1

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
symfonysymfony/http-kernelbefore 5.4.57; 6.0.0 to before 6.4.51; 7.0.0 to before 7.4.24; 8.0.0 to before 8.1.125.4.57, 6.4.51, 7.4.24, 8.1.12Patch availableCNA
symfonysymfony/symfonybefore 5.4.57; 6.0.0 to before 6.4.51; 7.0.0 to before 7.4.24; 8.0.0 to before 8.1.125.4.57, 6.4.51, 7.4.24, 8.1.12Patch availableCNA
  • symfony/http-kernel Vendorsymfony Affected before 5.4.57; 6.0.0 to before 6.4.51; 7.0.0 to before 7.4.24; 8.0.0 to before 8.1.12 Fixed in 5.4.57, 6.4.51, 7.4.24, 8.1.12 Patch available CNA
  • symfony/symfony Vendorsymfony Affected before 5.4.57; 6.0.0 to before 6.4.51; 7.0.0 to before 7.4.24; 8.0.0 to before 8.1.12 Fixed in 5.4.57, 6.4.51, 7.4.24, 8.1.12 Patch available CNA

Remediation

Upgrade symfony/http-kernel and symfony/symfony to 5.4.57, 6.4.51, 7.4.24 or 8.1.12, matching your major version. symfony/http-kernel requires the version of symfony/http-foundation that contains this fix, so upgrade symfony/http-foundation with it.

Written with Claude Haiku 5.5 from the sources below · 2026-11-25

  • Fix · CNA symfony/http-kernel (Symfony) Fixed in 5.4.57, 6.4.51, 7.4.24, 8.1.12
  • Fix · CNA symfony/symfony (Symfony) Fixed in 5.4.57, 6.4.51, 7.4.24, 8.1.12

Fixed in the same release

Records fixed by the same vendor advisory or release, as the CNA lists them.

  • Release ·

    symfony/symfony 5.4.57, 6.4.51 and 2 more versions

    13 records Highest priority Priority MEDIUM 2 MEDIUM, 11 LOW

    Other records, highest priority first

    • TI-2026-98149 Symfony Serializer CSV Header Nesting Without Limit Crashes PHPPriority MEDIUM 45
    • TI-2026-98148 Nested short ternaries make the Symfony expression parser hangPriority MEDIUM 45
    • TI-2026-98153 HttpClient lets a Proxy header choose the proxy under the CLI SAPIPriority LOW 37

Timeline

  1. 2026-11-25 Threatist record created from CVE-2026-133743

References

  • TI-2026-34283 Twig: The `spaceless` filter implicitly marks its output as safe CVSS 4.0MEDIUM 5.1
  • TI-2022-07667 Code injection in Twig CVSS 3.1CRITICAL 9.8
  • TI-2018-10028 Twig before 2.4.4 allows Server-Side Template Injection (SSTI) via the search search_key… CVSS 3.0CRITICAL 9.8
  • TI-2022-08704 Symfony storing cookie headers in HttpCache CVSS 3.1HIGH 8.8
  • TI-2026-98149 Symfony Serializer CSV Header Nesting Without Limit Crashes PHP CVSS 4.0HIGH 8.7
  • TI-2026-98148 Nested short ternaries make the Symfony expression parser hang CVSS 4.0HIGH 8.7
See all 129 →

Sources

This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences