# Mercurial 7.2.6: a crafted repo can run code on machines that clone, pull or read its patches (HG-SA-2026-001 to HG-SA-2026-004)

> Mercurial 7.2.6: a crafted repo can run code on machines that clone, pull or read its patches (HG-SA-2026-001 to HG-SA-2026-004), also tracked as HG-SA-2026-001 / HG-SA-2026-002 / HG-SA-2026-003 is a critical-severity threat campaign HOL Guard tracked from Nov 30, 2026 to Dec 3, 2026, verified against 4 primary sources and last reviewed Dec 3, 2026. Active tracking has ended and the record remains published as a permanent historical research record.

Canonical: https://hol.org/guard/security/campaigns/mercurial-7-2-6-critical-security-release
Last reviewed: Dec 3, 2026
Tracking status: historical / inactive

## Key facts

- Severity: critical
- Confidence: high
- First observed: Nov 30, 2026
- Last observed: Dec 3, 2026
- Primary sources: 4
- Reviewed artifacts: 1

## What happened

Mercurial released version 7.2.6 on December 3, 2026 as a critical security release and told all users to upgrade immediately. Four flaws, tracked as HG-SA-2026-001 through HG-SA-2026-004 with no CVE numbers assigned yet, can be combined so a crafted repository or bundle runs code on machines that clone, pull, unbundle or apply patches from a source they do not fully trust, and runs code on servers that untrusted users can push to. Two flaws affect every Mercurial version; the cache poisoning flaw covers 7.1 through 7.2.5 and the parallel-update symlink write covers 2.6 through 7.2.5. One flaw fires from hg log --patch with nothing checked out. The fix is the upgrade to 7.2.6, or a distribution package carrying the fixes; servers should also turn web.archivesubrepos off and leave it off.

## Evidence limits

Mercurial reports no exploitation in the wild, and none of the four flaws sits in CISA's Known Exploited Vulnerabilities catalog. No CVE numbers were assigned as of December 3, 2026; the vendor CVE column is blank. HOL did not reproduce the flaws; the account rests on the Mercurial release page, the Mercurial security advisories and the oss-sec announcement.

- Repositories a user and their team fully trust do not expose them; every flaw needs attacker-crafted data (a repository, a bundle or a clone bundle)
- Mercurial used only on a team's own projects, with no outside code pulled in, is outside the client-side risk
- Servers that take pushes only from their own team are outside the server-side risk
- Machines already on Mercurial 7.2.6, or on a distribution package carrying the fixes, are covered

## Timeline

- Nov 30, 2026 — other: Mercurial pre-announced the coordinated security release so distributions and hosting providers could prepare fixes.
- Dec 3, 2026 — other: Mercurial published the 7.2.6 release page calling it a critical security release, and the HG-SA-2026-001 to 004 advisory entries on its security page.
- Dec 3, 2026 — other: Raphaël Gomès announced Mercurial 7.2.6 on the oss-sec mailing list with the four flaw summaries and the upgrade instruction.
- Dec 3, 2026 — other: Mercurial 7.2.6 shipped with fixes for all four flaws; patched distribution packages landed the same day.
- Dec 3, 2026 — other: HOL published its operator write-up with the affected versions, the exposure check and the mitigations.

## Reviewed artifacts

- Mercurial@All versions affected by at least one flaw; fixed in 7.2.6 (generic)

## Sources

- [Mercurial, Mercurial 7.2.6 released](https://mercurial-scm.org/news/2026/0009-release-7.2.6) — other primary, observed Dec 3, 2026
- [Mercurial, security advisories (HG-SA-2026-001 to 004)](https://www.mercurial-scm.org/security) — other primary, observed Dec 3, 2026
- [Raphaël Gomès, Mercurial 7.2.6 critical security release (oss-sec)](https://seclists.org/oss-sec/2026/q4/999) — other primary, observed Dec 3, 2026
- [HOL Guard operator write-up](https://hol.org/blog/mercurial-7-2-6-critical-security-release) — other primary, observed Dec 3, 2026

## Machine-readable exports

- [JSON record](https://hol.org/guard/security/campaigns/mercurial-7-2-6-critical-security-release/data.json)
- [Artifact CSV](https://hol.org/guard/security/campaigns/mercurial-7-2-6-critical-security-release/artifacts.csv)
- [STIX 2.1 bundle](https://hol.org/guard/security/campaigns/mercurial-7-2-6-critical-security-release/stix.json)
- [Markdown record](https://hol.org/guard/security/campaigns/mercurial-7-2-6-critical-security-release/index.md)

Corrections: https://hol.org/guard/security/campaigns/mercurial-7-2-6-critical-security-release/corrections
