Mercurial up to 4.4.0 Repository .git/hooks/post-update os command injection

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
8.4$0-$5k0.00

Summaryinfo

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.

Detailsinfo

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.

Productinfo

Name

Version

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 8.5
VulDB 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: 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍

NVD Base Score: 🔍

Exploitinginfo

Class: Os command injection
CWE: 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-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

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 Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

Reaction Time: 🔍
0-Day Time: 🔍
Exposure Time: 🔍

Upgrade: Mercurial 4.4.1

Timelineinfo

11/03/2017 🔍
12/07/2017 +34 days 🔍
12/07/2017 +0 days 🔍
12/07/2017 +0 days 🔍
12/07/2017 +0 days 🔍
12/17/2017 +10 days 🔍
12/18/2017 +1 days 🔍
01/24/2018 +37 days 🔍
01/17/2023 +1819 days 🔍

Sourcesinfo

Advisory: DLA 1224-1
Status: 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: 🔍

Entryinfo

Created: 12/07/2017 23:34
Updated: 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.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Do you need the next level of professionalism?

Upgrade your account now!