The mirroring support (-M, --use-mirrors) in Python Pip before 1.5 uses insecure DNS querying and authenticity checks which allows attackers to perform man-in-the-middle attacks.
"https://github.com/pypa/advisory-database/blob/main/vulns/pip/PYSEC-2019-160.yaml"