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 1320155 - (CVE-2016-3069) CVE-2016-3069 mercurial: convert extension command injection via git repository names
CVE-2016-3069 mercurial: convert extension command injection via git reposito...
Status: CLOSED ERRATA
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=20160329,repor...
: Security
: 1322267 (view as bug list)
Depends On: 1323600 1327167 1327168
Blocks: 1319772 1322269
  Show dependency treegraph
 
Reported: 2016-03-22 08:37 EDT by Adam Mariš
Modified: 2016-05-02 09:02 EDT (History)
3 users (show)

See Also:
Fixed In Version: mercurial 3.7.3
Doc Type: Bug Fix
Doc Text:
It was discovered that the Mercurial convert extension failed to sanitize special characters in Git repository names. A Git repository with a specially crafted name could cause Mercurial to execute arbitrary code when the Git repository was converted to a Mercurial repository.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-05-02 09:02:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:0706 normal SHIPPED_LIVE Important: mercurial security update 2016-05-02 12:57:46 EDT

  None (edit)
Description Adam Mariš 2016-03-22 08:37:54 EDT
It was reported that Convert extension in mercurial is vulnerable to command execution.

Vulnerable code:

https://selenic.com/hg/file/28575/hgext/convert/git.py#l346

Incorrect handling of command line parameters allows passing a full Git remote URL via a directory name. The Git ext:: URL scheme can be used to obtain arbitrary command execution.

Furthermore, lack of escaping of shell metacharacters allows arbitrary command injection, which is another way of exploiting the vulnerable code.
Comment 1 Adam Mariš 2016-03-22 08:37:59 EDT
Acknowledgments:

Name: Blake Burkhart
Comment 3 Adam Mariš 2016-04-04 04:11:32 EDT
*** Bug 1322267 has been marked as a duplicate of this bug. ***
Comment 5 Adam Mariš 2016-04-04 04:14:22 EDT
Created mercurial tracking bugs for this issue:

Affects: fedora-all [bug 1323600]
Comment 6 Tomas Hoger 2016-04-14 07:31:30 EDT
This flaw is triggered by a malicious git repository name, when such repository is converted to mercurial repository.
Comment 8 errata-xmlrpc 2016-05-02 08:58:14 EDT
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.