Skip to content
High 8.1

Symfonyのhttp-foundationに生成URLが攻撃者のホストを指す脆弱性

CVE-2026-135802 First seen on SecPulse

Summary

Symfonyのhttp-foundationには、リクエストURIの先頭を細工すると、生成されるURLが攻撃者のホストを指してしまう脆弱性があります。ログインフォームの送信先が変わり、認証情報が攻撃者に渡るおそれがあり、CVSSは8.1です。5.4.56、6.4.50、7.4.23、8.1.11の修正版で直せるので、該当する版を使っている場合は更新してください。

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のhttp-foundationには、リクエストURIの先頭を細工すると、生成されるURLが攻撃者のホストを指してしまう脆弱性があります。ログインフォームの送信先が変わり、認証情報が攻撃者に渡るおそれがあり、CVSSは8.1です。5.4.56、6.4.50、7.4.23、8.1.11の修正版で直せるので、該当する版を使っている場合は更新してください。

Affected packages

PackageAffected → Fixed
Symfonysymfony/http-foundation
< 5.4.56→ 5.4.56
≥ 6.0.0, < 6.4.50→ 6.4.50
≥ 7.0.0, < 7.4.23→ 7.4.23
≥ 8.0.0, < 8.1.11→ 8.1.11
Symfonysymfony/symfony
< 5.4.56→ 5.4.56
≥ 6.0.0, < 6.4.50→ 6.4.50
≥ 7.0.0, < 7.4.23→ 7.4.23
≥ 8.0.0, < 8.1.11→ 8.1.11

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.

When Request::getBaseUrl() does not find the script name at the start of the request URI, it looks for it further into the path. This supports web servers that rewrite every URL to a front controller in a subdirectory. The base URL then kept everything before the script name, and the client chooses that part. A request URI starting with // or /\ made the base URL start with a host.

With SCRIPT_NAME=/public/index.php, a request for //evil.example/public/index.php/login is routed to /login, with the base URL //evil.example/public/index.php and the base path //evil.example/public. The URLs generated for that page then point to evil.example:

  • links built with path() and the actions of forms, so a login form sends the credentials of the user to evil.example;
  • redirects to generated URLs, such as the ones of redirectToRoute();
  • assets referenced with a relative path through asset(), so the page can load scripts from evil.example.

The attacker has to make a user follow a crafted link, such as https://app.example//evil.example/public/index.php/login. framework.trusted_hosts does not help, since the host of the request is the real one.

Applications are affected when their front controller is in a subdirectory and the web server sends it URIs that do not start with that directory. A .htaccess file at the root of the project that rewrites every URL to public/ does that, for instance.

Applications are also affected when the web server sets SCRIPT_NAME to the path of the request. S…

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