Security#
How to report security issues in Mercurial, and the list of the issues fixed so far.
Reporting a vulnerability#
Please do not report security issues on the public issue tracker or mailing lists. Instead, send them to mercurial-security@lists.mercurial-scm.org. The archives of this list are only available to its members and its subscriptions are moderated, so that issues can be discussed privately until a fix is released.
A report should describe the affected versions and configuration and the impact of the
issue. It should come with a reproducer: a self-contained and documented test in
Mercurial's .t format, like the ones in the tests/ directory of the repository. If
the issue cannot easily be reproduced that way, explain why convincingly instead.
You do not need to send a fix: the maintainers almost never fix an issue the same way as the reporter, so a clear reproducer helps them much more.
If you do not get an answer or need to escalate a matter, the Steering Committee can be reached at mercurial-steering AT mercurial-scm.org.
How issues are handled#
The members of the security list acknowledge the report and assess its impact.
A fix is prepared privately, and a CVE is requested when relevant.
Downstream packagers (distributions, extensions, etc.) are told a little in advance that a security release is coming, and may get access to the fixes a day or two before it.
The fix is published in a minor release, announced in the news with the
securitytag and documented in the release notes.The issue receives an
HG-SA-YYYY-NNidentifier and is added to the log below.
Supported versions#
Security fixes are released for the current stable series. They are backported to older series when the maintainers deem it worthwhile, or on request when the backport is doable.
Security advisories#
Identifiers are numbered in the order of the releases fixing the issues, within the year of the first release containing the fix.
ID |
CVE |
Summary |
Fixed in |
|---|---|---|---|
— |
Vulnerability in the vendored zstd library, fixed by upgrading to python-zstandard 0.23.0 |
||
Cross-site scripting (XSS) in hgweb |
|||
— |
|
||
Symlinks and subrepositories can defeat path auditing and write files outside the repository |
|||
— |
Out-of-bounds access through negative parents read from a revlog |
||
Out-of-bounds read when parsing a malformed manifest entry |
|||
Memory safety issues in binary patch decoding ( |
|||
Memory safety issues in binary patch decoding ( |
|||
Memory safety issues in binary patch decoding ( |
|||
Permissions bypass in the HTTP server for wire protocol commands and |
|||
Code execution through Git subrepositories; Git and Subversion subrepos disabled by default |
|||
— |
hgwebdir read |
||
Shell injection through ssh hostnames starting with |
|||
Incomplete symlink auditing allows writing files outside the repository |
|||
|
|||
Arbitrary code execution when converting Git repositories with hostile names |
|||
Arbitrary code execution through Git subrepository URLs on clone |
|||
Remote code execution through bounds-checking errors in binary delta decoding |
|||
Command injection through insufficient shell quoting of ssh repository paths |
|||
Case folding, HFS+ ignored codepoints and Windows short names could overwrite |
|||
— |
Incomplete path auditing, including case folding of |
||
— |
hgweb ignored the |
||
Git-style patches could touch files outside the repository |