Skip to content
High 7.0

Symfonyのhttp-kernelに、転送ヘッダーでアセットURLを改ざんされる脆弱性

CVE-2026-133743 First seen on SecPulse

Summary

Symfonyのインラインフラグメント処理で、信頼されないX-Forwarded-*などのヘッダーによってasset()やabsolute_url()が返すURLが書き換えられる脆弱性です。共有キャッシュにページが保存されると、閲覧者全員に攻撃者が指定したホストのURLが配信されるおそれがあります。影響はsymfony/http-kernelとsymfony/symfonyの5.4.57未満、6.0.0以上6.4.51未満、7.0.0以上7.4.24未満、8.0.0以上8.1.12未満で、5.4.57、6.4.51、7.4.24、8.1.12以降の修正版で対処できます。

AI summary

Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.

Symfonyのインラインフラグメント処理で、信頼されないX-Forwarded-*などのヘッダーによってasset()やabsolute_url()が返すURLが書き換えられる脆弱性です。共有キャッシュにページが保存されると、閲覧者全員に攻撃者が指定したホストのURLが配信されるおそれがあります。影響はsymfony/http-kernelとsymfony/symfonyの5.4.57未満、6.0.0以上6.4.51未満、7.0.0以上7.4.24未満、8.0.0以上8.1.12未満で、5.4.57、6.4.51、7.4.24、8.1.12以降の修正版で対処できます。

Affected packages

PackageAffected → Fixed
Symfonysymfony/http-kernel
< 5.4.57→ 5.4.57
≥ 6.0.0, < 6.4.51→ 6.4.51
≥ 7.0.0, < 7.4.24→ 7.4.24
≥ 8.0.0, < 8.1.12→ 8.1.12
Symfonysymfony/symfony
< 5.4.57→ 5.4.57
≥ 6.0.0, < 6.4.51→ 6.4.51
≥ 7.0.0, < 7.4.24→ 7.4.24
≥ 8.0.0, < 8.1.12→ 8.1.12

Fix status by distribution

Records published by each distribution for this CVE. Fixed versions differ by release; check each link.

Original description The description as published by the source.

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…

Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details