CVE-2016-3105: Mercurial Mercurial Vulnerable To Arbitrary Code Vulnerability
HIGHCVE-2016-3105 is a HIGH (CVSS 8.8) mercurial vulnerable to arbitrary code vulnerability (CWE-284: Improper Access Control) affecting Mercurial libraries in the PyPI ecosystem. The issue involves mercurial vulnerable to arbitrary code execution when converting git repos. Remediation is available by upgrading affected packages to version 3.8.
CVE-2016-3105 at a Glance
Security Impact
CVSS: 8.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H).
How to Fix CVE-2016-3105
To remediate this vulnerability, upgrade all affected Mercurial dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install mercurial>=3.8
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show mercurial
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2016-3105, inspect your installed packages using pip:
pip show mercurial
Analyze the terminal output to locate any version of Mercurial in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.8), your application is affected.
Note: The pip show mercurial command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-284: Improper Access Control, where the product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. In Mercurial, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2016-3105 Affected Mercurial Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
mercurial
|
PyPI |
< 3.8
|
3.8
|
References
Frequently Asked Questions
What is CVE-2016-3105?
Which Mercurial versions are affected?
What version fixes CVE-2016-3105?
Is mercurial affected?
What is the CVSS score of CVE-2016-3105?
What CWE is associated with CVE-2016-3105?
How can I check PyPI dependencies for CVE-2016-3105?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-49cw-434h-qc57",
"modified" : "2024-09-30T20:45:24Z",
"published" : "2022-05-17T02:37:31Z",
"aliases" : [ "CVE-2016-3105" ],
"summary" : "Mercurial vulnerable to arbitrary code execution when converting Git repos",
"details" : "The convert extension in Mercurial before 3.8 might allow context-dependent attackers to execute arbitrary code via a crafted git repository name.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "mercurial"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.8"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2016-3105"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/mercurial/PYSEC-2016-28.yaml"
}, {
"type" : "WEB",
"url" : "https://security.gentoo.org/glsa/201612-19"
}, {
"type" : "WEB",
"url" : "https://selenic.com/hg/rev/a56296f55a5e"
}, {
"type" : "WEB",
"url" : "https://web.archive.org/web/20200228012056/http://www.securityfocus.com/bid/90536"
}, {
"type" : "WEB",
"url" : "https://www.mercurial-scm.org/wiki/WhatsNew#Mercurial_3.8_.2F_3.8.1_.282016-5-1.29"
}, {
"type" : "WEB",
"url" : "http://lists.opensuse.org/opensuse-updates/2016-05/msg00082.html"
}, {
"type" : "WEB",
"url" : "http://www.debian.org/security/2016/dsa-3570"
}, {
"type" : "WEB",
"url" : "http://www.slackware.com/security/viewer.php?l=slackware-security&y=2016&m=slackware-security.533255"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-284" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-05-01T17:05:25Z",
"nvd_published_at" : "2016-05-09T20:59:00Z"
}
}