Quote from release notes: All versions of Mercurial prior to 4.5.2 have vulnerabilities in the HTTP server that allow permissions bypass to: Perform writes on repositories that should be read-only Perform reads on repositories that shouldn't allow read access The nature of the vulnerabilities is: Wire protocol commands that didn't explicitly declare their permissions had no permissions checking done. The web.{allow-pull, allow-push, deny_read, etc} config options governing access control were never consulted when running these commands. This allowed permissions bypass for impacted commands. The batch wire protocol command did not list its permission requirements nor did it enforce permissions on individual sub-commands. The implication of these vulnerabilities is that no permissions checking was performed on commands and this could lead to accessing data that web.* config options were supposed to prevent access to or modifying data (via wire protocol commands that can mutate data) without authorization. A Mercurial HTTP server in its default configuration is supposed to be read-only. However, a well-crafted batch command could invoke commands that perform writes. Upstream patch: https://www.mercurial-scm.org/repo/hg/rev/2ecb0fc535b1 References: https://www.mercurial-scm.org/wiki/WhatsNew#Mercurial_4.5.1_.2F_4.5.2_.282018-03-06.29
Created mercurial tracking bugs for this issue: Affects: fedora-all [bug 1553267]
As per upstream, there are two attack vectors here (which have been assigned one CVE): 1. Wire protocol commands: The write protocol performs all mercurial network access via either http or ssh. These did not declare any permissions and did not check permissions before their execution. This flaw has existed in mercurial since version 1.0. All versions of mercurial shipped in Red Hat Enterprise Linux are affected by this particular flaw. 2. "batch wire protocol commands": The batch write permissions bypass has been present since Mercurial 1.9. A well-crafted batch command could invoke commands that performs unauthorized writes. Only Red Hat Enterprise Linux 7 is affected by this flaw.
This issue has been addressed in the following products: Red Hat Enterprise Linux 7 Via RHSA-2019:2276 https://access.redhat.com/errata/RHSA-2019:2276
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s): https://access.redhat.com/security/cve/cve-2018-1000132