Description
The _validaterepo function in sshpeer in Mercurial before 3.2.4 allows remote attackers to execute arbitrary commands via a crafted repository name in a clone command.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | mercurial | 3.4-1 | — |
| Debian 13 | mercurial | 3.4-1 | — |
| Debian 12 | mercurial | 3.4-1 | — |
| Debian 8 | mercurial | 3.1.2-2+deb8u1 | DSA-3257-1 |
| Debian 7 | mercurial | 2.2.2-4+deb7u1 | DSA-3257-1 |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 6.0 | mercurial | 1.6.4-1+deb6u1 | DLA-237-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 14.04 LTS | mercurial | 2.8.2-1ubuntu1.3 | — |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 12 | mercurial | 2.8.2-3.1 | SUSE-SU-2015:0836-1 |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | mercurial | < 3.2.4 | 3.2.4 | GHSA-3pmw-h7j4-rf54 |
Advisories 3
- DSA-3257-1 mercurial - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DLA-237-1 mercurial - security update Debian Security (DSA / DLA) · Mar 9, 2026
- SUSE-SU-2015:0836-1 Security update for mercurial SUSE / openSUSE Security Updates · Feb 4, 2026
References
- GLSA-201612-19 vendor-advisory
- http://chargen.matasano.com/chargen/2015/3/17/this-new-vulnerability-mercurial-command-injection-cve-2014-9462.html
- http://www.oracle.com/technetwork/topics/security/bulletinjul2015-2511963.html
- openSUSE-SU-2015:0617 vendor-advisory
- 119816 vdb-entry
- http://mercurial.selenic.com/wiki/WhatsNew
- DSA-3257 vendor-advisory