# GHSA-XF2Q-GFHQ-MV2Q: Login Redirects Can Still Reach Another Host When the Session Cookie Domain Is Set: Incomplete Fix for CVE-2017-16652

- Database: GitHub
- Severity: CVSS 5.3 (Medium)
- Published: 2026-11-25
- Modified: 2026-11-25

## Tracked as

- [CVE-2026-134790](https://cve.now/CVE-2026-134790.md): symfony/security-http open redirect in login redirect host check

## Affected versions

- symfony/security-http (Packagist): fixed in 5.4.57
- symfony/security-http (Packagist): from 6, fixed in 6.4.51
- symfony/security-http (Packagist): from 7, fixed in 7.4.24
- symfony/security-http (Packagist): from 8, fixed in 8.1.12
- symfony/symfony (Packagist): fixed in 5.4.57
- symfony/symfony (Packagist): from 6, fixed in 6.4.51
- symfony/symfony (Packagist): from 7, fixed in 7.4.24
- symfony/symfony (Packagist): from 8, fixed in 8.1.12

## Description

### Description

The fix for CVE-2017-16652 restricts the redirects of `HttpUtils::createRedirectResponse()` to the host of the request. When `framework.session.cookie_domain` is set, it also allows the subdomains of that domain. To check a target, it read the host of the URL up to the first "/". But browsers also end the host at "\", "?" and "#". So with the cookie domain `.example.com`, a target like `https://evil.test?.example.com` passed the check, and the browser went to evil.test.

Applications are exposed when `framework.session.cookie_domain` is set. The default success and failure handlers of `form_login` redirect to the `_target_path` or `_failure_path` of the request. A login link can then send the user to another site right after a successful login, for example to ask for the password again.

### Resolution

`HttpUtils` now ends the host of a target where browsers do, before checking it against the allowed domains.

The patch for this issue is available [here](https://github.com/symfony/symfony/commit/b311687afd165a4f62dcd2dff4632be7eb1db844) for branch 5.4.

### Credits

We would like to thank [Amimul Ihsan](https://github.com/aimahdi) for reporting the issue and Nicolas Grekas for providing the fix.

## References

- https://github.com/symfony/symfony/security/advisories/GHSA-xf2q-gfhq-mv2q

Page: https://cve.now/GHSA-XF2Q-GFHQ-MV2Q

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
