Bug 1319768 (CVE-2016-3068) - CVE-2016-3068 mercurial: command injection via git subrepository urls
Summary: CVE-2016-3068 mercurial: command injection via git subrepository urls
Alias: CVE-2016-3068
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
: 1322266 (view as bug list)
Depends On: 1322268 1323599 1327167 1327168
Blocks: 1319772 1322269
TreeView+ depends on / blocked
Reported: 2016-03-21 13:27 UTC by Adam Mariš
Modified: 2021-02-17 04:08 UTC (History)
3 users (show)

Fixed In Version: mercurial 3.7.3
Doc Type: Bug Fix
Doc Text:
It was discovered that Mercurial failed to properly check Git sub-repository URLs. A Mercurial repository that includes a Git sub-repository with a specially crafted URL could cause Mercurial to execute arbitrary code.
Clone Of:
Last Closed: 2016-05-02 13:02:14 UTC

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:0706 0 normal SHIPPED_LIVE Important: mercurial security update 2016-05-02 16:57:46 UTC

Description Adam Mariš 2016-03-21 13:27:43 UTC
It was reported that in mercurial, there is similar vulnerability as CVE-2015-7545 in git. Git's git-remote-ext remote helper provides an ext:: URL scheme that allows running arbitrary shell commands. Mercurial allows specifying git repositories as subrepositories. Git ext:: URLs can be specified as Mercurial subrepositories allowing arbitrary shell commands to be run on `hg clone ...`.

Comment 1 Adam Mariš 2016-03-21 13:27:47 UTC

Name: Blake Burkhart

Comment 3 Adam Mariš 2016-04-04 08:08:02 UTC
*** Bug 1322266 has been marked as a duplicate of this bug. ***

Comment 5 Adam Mariš 2016-04-04 08:13:12 UTC
Created mercurial tracking bugs for this issue:

Affects: fedora-all [bug 1323599]

Comment 6 Tomas Hoger 2016-04-14 11:27:31 UTC
Support for git subrepos was introduced upstream in mercurial version 1.8:


Therefore, mercurial packages in Red Hat Enterprise Linux 6 based on upstream version 1.4 were not affected by this issue.

Comment 13 errata-xmlrpc 2016-05-02 12:58:09 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2016:0706 https://rhn.redhat.com/errata/RHSA-2016-0706.html

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