Mercurial - Remote Arbitrary Code Execution
Summary
DLA-1224-1: mercurial - security update. Affects mercurial versions < 2.2.2-4+deb7u6. Fixed in 2.2.2-4+deb7u6. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Mercurial is a distributed version control system used for managing and tracking changes to files. It is commonly used for software development projects to keep track of code changes and collaborate with other developers. The vulnerability in Mercurial allows for remote arbitrary code execution, which means an attacker can execute malicious code on a target system remotely.
Vulnerability Detail
The vulnerability, identified as CVE-2017-17458, occurs when a specially malformed Mercurial repository is created programmatically. This repository can cause Git subrepositories to run arbitrary code in the form of a .git/hooks/post-update script checked into the parent repository. While typical use of Mercurial prevents the construction of such repositories, they can still be created programmatically. This vulnerability poses a significant risk as it allows an attacker to execute arbitrary code on the target system, potentially leading to further compromise or unauthorized access.
How To Fix
Minimum fixed version
2.2.2-4+deb7u6
This is the first release that contains the fix.
sudo apt-get install --only-upgrade mercurial
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no specific workaround mentioned for this vulnerability. However, it is crucial to ensure that you are using the latest version of Mercurial and have applied the necessary security updates to mitigate the risk of remote arbitrary code execution.
Conclusion
The vulnerability in Mercurial allows for remote arbitrary code execution, posing a significant risk to systems using vulnerable versions. It is crucial to upgrade to the latest version of Mercurial and apply the necessary security updates to mitigate this risk. For further support on vulnerability remediation, you can contact DevNack.com.
See every vulnerability recorded for mercurial →
FAQ
Mercurial is a distributed version control system used for managing and tracking changes to files. It is commonly used in software development projects.
Remote arbitrary code execution refers to the ability of an attacker to execute malicious code on a target system remotely, without direct access to the system.
The vulnerability occurs when a specially malformed Mercurial repository is created programmatically, allowing for the execution of arbitrary code.
The vulnerability can lead to unauthorized code execution on the target system, potentially allowing an attacker to gain further access or compromise the system.
To fix this vulnerability, it is recommended to upgrade the Mercurial package to version 2.2.2-4+deb7u6 or later.
Related vulnerabilities
Recent vulnerabilities recorded for mercurial.