Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 1553265 - (CVE-2018-1000132) CVE-2018-1000132 mercurial: HTTP server permissions bypass
CVE-2018-1000132 mercurial: HTTP server permissions bypass
Status: NEW
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
medium Severity medium
: ---
: ---
Assigned To: Red Hat Product Security
impact=moderate,public=20180308,repor...
: Security
Depends On: 1553267 1564351 1564353 1564352
Blocks: 1553270
  Show dependency treegraph
 
Reported: 2018-03-08 10:27 EST by Pedro Sampaio
Modified: 2018-09-30 18:12 EDT (History)
6 users (show)

See Also:
Fixed In Version: mercurial 4.5.2
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Pedro Sampaio 2018-03-08 10:27:47 EST
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
Comment 1 Pedro Sampaio 2018-03-08 10:28:43 EST
Created mercurial tracking bugs for this issue:

Affects: fedora-all [bug 1553267]
Comment 3 Huzaifa S. Sidhpurwala 2018-04-05 23:36:16 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.