Mercurial up to 4.4.0 Repository .git/hooks/post-update os command injection
| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 8.4 | $0-$5k | 0.00 |
Summary
A vulnerability, which was classified as critical, has been found in Mercurial up to 4.4.0. Impacted is an unknown function of the file .git/hooks/post-update of the component Repository Handler. This manipulation causes os command injection. This vulnerability is registered as CVE-2017-17458. Remote exploitation of the attack is possible. No exploit is available. It is advisable to upgrade the affected component.
Details
A vulnerability has been found in Mercurial up to 4.4.0 and classified as critical. Affected by this vulnerability is an unknown functionality of the file .git/hooks/post-update of the component Repository Handler. The manipulation with an unknown input leads to a os command injection vulnerability. The CWE definition for the vulnerability is CWE-78. The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. As an impact it is known to affect confidentiality, integrity, and availability. The summary by CVE is:
In Mercurial before 4.4.1, it is possible that a specially malformed repository can cause Git subrepositories to run arbitrary code in the form of a .git/hooks/post-update script checked into the repository. Typical use of Mercurial prevents construction of such repositories, but they can be created programmatically.
The bug was discovered 11/03/2017. The weakness was published 12/07/2017 (Website). It is possible to read the advisory at bz.mercurial-scm.org. This vulnerability is known as CVE-2017-17458 since 12/07/2017. The exploitation appears to be easy. The attack can be launched remotely. The exploitation doesn't need any form of authentication. Technical details of the vulnerability are known, but there is no available exploit. The attack technique deployed by this issue is T1202 according to MITRE ATT&CK.
The vulnerability was handled as a non-public zero-day exploit for at least 34 days. During that time the estimated underground price was around $0-$5k. The vulnerability scanner Nessus provides a plugin with the ID 105343 (openSUSE Security Update : mercurial (openSUSE-2017-1388)), which helps to determine the existence of the flaw in a target environment. It is assigned to the family SuSE Local Security Checks and running in the context l. The commercial vulnerability scanner Qualys is able to test this issue with plugin 370785 (Sourcetree for macOS and Windows Mercurial Arbitrary Command Execution Vulnerability).
Upgrading to version 4.4.1 eliminates this vulnerability. A possible mitigation has been published 2 weeks after the disclosure of the vulnerability.
The vulnerability is also documented in the databases at Tenable (105343) and SecurityFocus (BID 102926†). Similar entries are available at VDB-110972, VDB-112474 and VDB-112475. Be aware that VulDB is the high quality source for vulnerability data.
Product
Name
Version
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔍VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 8.5VulDB Meta Temp Score: 8.4
VulDB Base Score: 7.3
VulDB Temp Score: 7.0
VulDB Vector: 🔍
VulDB Reliability: 🔍
NVD Base Score: 9.8
NVD Vector: 🔍
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍
NVD Base Score: 🔍
Exploiting
Class: Os command injectionCWE: CWE-78 / CWE-77 / CWE-74
CAPEC: 🔍
ATT&CK: 🔍
Physical: No
Local: No
Remote: Yes
Availability: 🔍
Status: Not defined
EPSS Score: 🔍
EPSS Percentile: 🔍
Price Prediction: 🔍
Current Price Estimation: 🔍
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Nessus ID: 105343
Nessus Name: openSUSE Security Update : mercurial (openSUSE-2017-1388)
Nessus File: 🔍
Nessus Risk: 🔍
Nessus Family: 🔍
Nessus Context: 🔍
Qualys ID: 🔍
Qualys Name: 🔍
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
Reaction Time: 🔍
0-Day Time: 🔍
Exposure Time: 🔍
Upgrade: Mercurial 4.4.1
Timeline
11/03/2017 🔍12/07/2017 🔍
12/07/2017 🔍
12/07/2017 🔍
12/07/2017 🔍
12/17/2017 🔍
12/18/2017 🔍
01/24/2018 🔍
01/17/2023 🔍
Sources
Advisory: DLA 1224-1Status: Not defined
Confirmation: 🔍
CVE: CVE-2017-17458 (🔍)
GCVE (CVE): GCVE-0-2017-17458
GCVE (VulDB): GCVE-100-110335
SecurityFocus: 102926 - Atlassian SourceTree Multiple Command Injection and Command Execution Vulnerabilities
See also: 🔍
Entry
Created: 12/07/2017 23:34Updated: 01/17/2023 09:44
Changes: 12/07/2017 23:34 (71), 12/12/2019 19:49 (9), 01/17/2023 09:44 (4)
Complete: 🔍
Cache ID: 216:E5B:103
Be aware that VulDB is the high quality source for vulnerability data.
No comments yet. Languages: en.
Please log in to comment.