CVE-2016-3630: Mercurial Binary Delta Decoder Remote Code Execution

mercurial Updated 02 Oct 2025

Summary

13/04/2016
Yes i
High
8.8

CVE-2016-3630: The binary delta decoder in Mercurial before 3.7.3 allows remote attackers to execute arbitrary code via a (1) clone, (2) push, or (3) pull command, related to (a) a list sizing rounding error and (b) short records. Affects mercurial versions < 3.7.3. Fixed in 3.7.3. How to fix ↓

Also tracked for

The same CVE-2016-3630 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) used for managing and tracking changes to files. It provides a way for multiple developers to collaborate on a project by keeping track of changes made to the codebase. The Mercurial package, available on PyPI, is vulnerable to a remote code execution vulnerability in its binary delta decoder. This vulnerability allows an attacker to execute arbitrary code by exploiting a list sizing rounding error and short records in the clone, push, or pull commands.

Vulnerability Detail

The vulnerability in Mercurial arises from a flaw in the binary delta decoder. By manipulating the list sizing rounding error and short records, an attacker can craft a malicious delta file that triggers arbitrary code execution when processed by the clone, push, or pull commands. This can lead to unauthorized access, data leakage, or even complete compromise of the affected system. The vulnerability affects versions prior to 3.7.3 of the Mercurial package.

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 crucial to update the Mercurial package to the latest version to mitigate the risk of exploitation.

Conclusion

The Mercurial package is vulnerable to a remote code execution vulnerability in its binary delta decoder. To mitigate the risk, it is important to update the package to version 3.7.3 or later. 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 provides a way for multiple developers to collaborate on a project by keeping track of changes made to the codebase.

This vulnerability allows an attacker to execute arbitrary code on the affected system. This can lead to unauthorized access, data leakage, or complete compromise of the system.

To fix this vulnerability, update the Mercurial package to version 3.7.3 or later by running the command 'pip install --upgrade mercurial'.

There is no known workaround for this vulnerability. It is crucial to update the Mercurial package to the latest version to mitigate the risk of exploitation.

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