CVE-2017-16652: Open redirect vulnerability on security handlers

Affected versions

Symfony 2.7.0 to 2.7.37, 2.8.0 to 2.8.30, 3.2.0 to 3.2.13, and 3.3.0 to 3.3.12 versions of the Symfony Security component are affected by this security issue.

The issue has been fixed in Symfony 2.7.38, 2.8.31, 3.2.14, 3.3.13, 3.4-BETA5, and 4.0-BETA5.

Note that no fixes are provided for Symfony 3.0 and 3.1 as they are not maintained anymore.


DefaultAuthenticationSuccessHandler or DefaultAuthenticationFailureHandler take the content of the _target_path parameter and generate a redirect response but no check is performed on the path, which could be an absolute URL to an external domain, opening redirect vulnerability.

Open redirect vulnerability are not too much considered but they can be exploited for example to mount effective phishing attacks.


The fix forces the redirect target to be within the scope of the session cookie. The allowed redirect targets must now match the cookie_domain and cookie_secure configuration options.

The patch for this issue is available here.


I would like to thank Stefano Angaran for reporting this security issue, Nicolas Grekas for providing a fix, and the Symfony Core Team for reviewing the patch.

Manage your notification preferences to receive an email as soon as a Symfony security release is published.
If you have found a security issue in Symfony, please send the details to security [at] and don't disclose it publicly until we can provide a fix for it.
Help the Symfony project!

As with any Open-Source project, contributing code or documentation is the most common way to help, but we also have a wide range of sponsoring opportunities.

CVE-2017-16652: Open redirect vulnerability on security handlers

Tweet this


Great . Thanks for the update on validating redirect targets using the session cookie domain

Comments are closed.

To ensure that comments stay relevant, they are closed for old posts.