Arbitrary Code Execution in Mercurial

mercurial Updated 02 Oct 2025

Summary

06/05/2016
N/A
Yes i
Unrated
Not published

DLA-459-1: mercurial - security update. Affects mercurial versions < 2.2.2-4+deb7u3. Fixed in 2.2.2-4+deb7u3. How to fix ↓

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

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

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 used for managing and tracking changes to files. It provides a way for multiple developers to collaborate on a project by keeping track of different versions of files and merging changes. The vulnerability affects the convert extension in Mercurial, specifically when used on Git repositories with specially crafted names. This flaw can be exploited to execute arbitrary code and is particularly dangerous for automated code conversion services that allow arbitrary repository names.

Vulnerability Detail

The vulnerability in Mercurial arises from a flaw in the convert extension when handling Git repositories with manipulated names. An attacker can create a Git repository with a specially crafted name and use it to trigger arbitrary code execution when the convert extension is used on that repository. This can lead to remote code execution and potential compromise of the system. The vulnerability has been assigned the CVE identifier CVE-2016-3105.

How To Fix

Minimum fixed version

2.2.2-4+deb7u3

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, users can mitigate the risk by ensuring that they do not use the convert extension on Git repositories with suspicious or manipulated names. It is also recommended to keep the Mercurial software up to date with the latest security patches.

Conclusion

The arbitrary code execution vulnerability in Mercurial can be mitigated by updating to the patched version of the software. It is important to keep Mercurial up to date with the latest security patches to ensure the integrity and security of version control operations. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for mercurial →

Share this vulnerability

FAQ

Mercurial is a distributed version control system used for managing and tracking changes to files. It provides a way for multiple developers to collaborate on a project by keeping track of different versions of files and merging changes.

The convert extension in Mercurial allows users to convert repositories from other version control systems, such as Git, into Mercurial repositories. It provides a way to migrate projects from one system to another.

Automated code conversion services that allow arbitrary repository names are particularly vulnerable to this flaw. An attacker can create a Git repository with a specially crafted name and use it to trigger arbitrary code execution when the convert extension is used on that repository. This can lead to remote code execution and potential compromise of the system.

The vulnerability in Mercurial can be exploited to execute arbitrary code, potentially leading to remote code execution and compromise of the system. It is important to update to the patched version of Mercurial to mitigate this risk.

To fix this vulnerability, it is recommended to update Mercurial to version 2.2.2-4+deb7u3 or later. Users can update their Mercurial installation by following the instructions provided by the package manager or by manually downloading and installing the updated package from the official Mercurial website.

Related vulnerabilities

Recent vulnerabilities recorded for mercurial.

How To Fix

Minimum fixed version

2.2.2-4+deb7u3

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 →

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