CVE-2016-3069: Mercurial Remote Code Execution

mercurial Updated 02 Oct 2025

Summary

13/04/2016
Yes i
High
8.8

CVE-2016-3069: Mercurial before 3.7.3 allows remote attackers to execute arbitrary code via a crafted name when converting a Git repository. Affects mercurial versions < 3.7.3. Fixed in 3.7.3. How to fix ↓

Also tracked for

The same CVE-2016-3069 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Mercurial is a distributed version control system (DVCS) that provides a fast and scalable solution for managing source code repositories. It is widely used in software development to track changes, collaborate on projects, and manage code history. However, versions of Mercurial prior to 3.7.3 are vulnerable to remote code execution when converting a Git repository. This vulnerability can be exploited by remote attackers through a crafted name, potentially leading to arbitrary code execution on the target system.

Vulnerability Detail

The vulnerability (CVE-2016-3069) in Mercurial arises from a flaw in the handling of repository conversions from Git. By providing a specially crafted name during the conversion process, an attacker can trigger the execution of arbitrary code. This can have severe consequences, including unauthorized access to sensitive information, system compromise, and potential further exploitation of the affected system. It is crucial to address this vulnerability promptly to mitigate the risk of exploitation.

How To Fix

Latest published version: 7.2.4 as of 22 Oct 2026

pip install --upgrade "mercurial==7.2.4"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

3.7.3

This is the first release that contains the fix.

pip install --upgrade "mercurial==3.7.3"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is essential to apply the official patch or update to the latest version of Mercurial to eliminate the risk of remote code execution.

Conclusion

The vulnerability (CVE-2016-3069) in Mercurial allows remote code execution and poses a significant risk to systems running vulnerable versions. It is crucial to update to the latest version of Mercurial (3.7.3 or later) to mitigate this vulnerability. Failure to address this issue promptly may result in unauthorized access, system compromise, and potential further exploitation. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for mercurial →

Share this vulnerability

FAQ

Mercurial is a distributed version control system (DVCS) used for managing source code repositories.

This vulnerability allows remote attackers to execute arbitrary code on systems running vulnerable versions of Mercurial.

To fix this vulnerability, update the Mercurial package to version 3.7.3 or later.

No, there is no known workaround for this vulnerability. Updating to the latest version is the recommended solution.

Related vulnerabilities

Recent vulnerabilities recorded for mercurial.

How To Fix

Latest published version: 7.2.4 as of 22 Oct 2026

pip install --upgrade "mercurial==7.2.4"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

3.7.3

This is the first release that contains the fix.

pip install --upgrade "mercurial==3.7.3"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback