Mercurial prior to version 4.3 is vulnerable to a missing symlink check that can malicious repositories to modify files outside the repository
https://www.mercurial-scm.org/wiki/WhatsNew#Mercurial_4.3_.2F_4.3.1_.282017-08-10.29
https://security.gentoo.org/glsa/201709-18
https://access.redhat.com/errata/RHSA-2017:2489