Before WordPress 4.9.5, the redirection URL for the login page was not validated or sanitized if forced to use HTTPS.
https://www.debian.org/security/2018/dsa-4193
https://wpvulndb.com/vulnerabilities/9054
https://wordpress.org/news/2018/04/wordpress-4-9-5-security-and-maintenance-release/
https://lists.debian.org/debian-lts-announce/2018/04/msg00031.html
https://github.com/WordPress/WordPress/commit/14bc2c0a6fde0da04b47130707e01df850eedc7e
https://core.trac.wordpress.org/changeset/42892