Versions mentioned in the description apply to the upstream
Remediation section below for
Debian:9 relevant versions.
Mercurial before 1.6.4 fails to verify the Common Name field of SSL certificates which allows remote attackers who acquire a certificate signed by a Certificate Authority to perform a man-in-the-middle attack.
mercurial to version 1.6.4-1 or higher.