CVE-2018-19790: Open Redirect Vulnerability when using Security\Http

Affected versions

Symfony 2.7.0 to 2.7.49, 2.8.0 to 2.8.48, 3.0.0 to 3.4.19, 4.0.0 to 4.0.14, 4.1.0 to 4.1.8 and 4.2.0 versions of the Symfony Form component are affected by this security issue.

The issue has been fixed in Symfony 2.7.50, 2.8.49, 3.4.20, 4.0.15, 4.1.9 and 4.2.1.

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

Description

Using backslashes in the _failure_path input field of login forms, one can work around the redirection target restrictions and effectively redirect the user to any domain after login.

Resolution

The regular expression filtering redirection targets has been updated to account for a mix of forward and backward slashes.

The patch for this issue is available here for branch 2.7.

Credits

I would like to thank the EC-CUBE Dev Team for reporting the issue and Christian Flothmann for fixing it.

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] symfony.com and don't disclose it publicly until we can provide a fix for it.

Comments

Useful information, by activating the always_use_default_target_path within the login configuration you will actively mitigate this issue for logins (in older Symfony versions), as when this is set to true the redirect for the login will always be forwarded to /
This post refers to the Symfony Form component, but it should be the Security component, right?
Login with SymfonyConnect to post a comment