Mercurial - Remote Arbitrary Code Execution

mercurial Updated 02 Oct 2025

Summary

28/12/2017
N/A
Yes i
Unrated
Not published

DLA-1224-1: mercurial - security update. Affects mercurial versions < 2.2.2-4+deb7u6. Fixed in 2.2.2-4+deb7u6. 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 Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

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 →

Share this vulnerability

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.

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 →

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