{
  "schemaVersion": "guard-threat-campaign/v1",
  "id": "HGTC-2026-7B9469C3",
  "slug": "mercurial-7-2-6-critical-security-release",
  "title": "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)",
  "aliases": [
    "HG-SA-2026-001",
    "HG-SA-2026-002",
    "HG-SA-2026-003",
    "HG-SA-2026-004"
  ],
  "summary": "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.",
  "status": "published",
  "severity": "critical",
  "confidence": "high",
  "uncertainty": "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.",
  "firstObservedAt": "2026-11-30T00:00:00.000Z",
  "lastObservedAt": "2026-12-03T17:19:00.000Z",
  "publishedAt": "2026-12-03T17:27:55.896Z",
  "reviewedAt": "2026-12-03T17:27:39.165Z",
  "expiresAt": "2026-12-03T17:19:00.000Z",
  "reviewer": "HOL Guard Security Publishing",
  "sources": [
    {
      "id": "mercurial-726-release",
      "label": "Mercurial, Mercurial 7.2.6 released",
      "url": "https://mercurial-scm.org/news/2026/0009-release-7.2.6",
      "sourceType": "other_primary",
      "observedAt": "2026-12-03T00:00:00.000Z"
    },
    {
      "id": "mercurial-security-advisories",
      "label": "Mercurial, security advisories (HG-SA-2026-001 to 004)",
      "url": "https://www.mercurial-scm.org/security",
      "sourceType": "other_primary",
      "observedAt": "2026-12-03T00:00:00.000Z"
    },
    {
      "id": "oss-sec-mercurial-726",
      "label": "Raphaël Gomès, Mercurial 7.2.6 critical security release (oss-sec)",
      "url": "https://seclists.org/oss-sec/2026/q4/999",
      "sourceType": "other_primary",
      "observedAt": "2026-12-03T00:00:00.000Z"
    },
    {
      "id": "hol-blog",
      "label": "HOL Guard operator write-up",
      "url": "https://hol.org/blog/mercurial-7-2-6-critical-security-release",
      "sourceType": "other_primary",
      "observedAt": "2026-12-03T00:00:00.000Z"
    }
  ],
  "artifacts": [
    {
      "id": "mercurial",
      "artifactClass": "package",
      "ecosystem": "generic",
      "name": "Mercurial",
      "version": "All versions affected by at least one flaw; fixed in 7.2.6",
      "defanged": false
    }
  ],
  "indicators": [],
  "timeline": [
    {
      "id": "release-preannounced",
      "occurredAt": "2026-11-30T00:00:00.000Z",
      "eventType": "other",
      "summary": "Mercurial pre-announced the coordinated security release so distributions and hosting providers could prepare fixes.",
      "sourceIds": [
        "mercurial-726-release"
      ]
    },
    {
      "id": "vendor-advisory-published",
      "occurredAt": "2026-12-03T00:00:00.000Z",
      "eventType": "other",
      "summary": "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.",
      "sourceIds": [
        "mercurial-726-release",
        "mercurial-security-advisories"
      ]
    },
    {
      "id": "oss-sec-announcement",
      "occurredAt": "2026-12-03T00:00:00.000Z",
      "eventType": "other",
      "summary": "Raphaël Gomès announced Mercurial 7.2.6 on the oss-sec mailing list with the four flaw summaries and the upgrade instruction.",
      "sourceIds": [
        "oss-sec-mercurial-726"
      ]
    },
    {
      "id": "fix-released-7-2-6",
      "occurredAt": "2026-12-03T00:00:00.000Z",
      "eventType": "other",
      "summary": "Mercurial 7.2.6 shipped with fixes for all four flaws; patched distribution packages landed the same day.",
      "sourceIds": [
        "mercurial-726-release"
      ]
    },
    {
      "id": "hol-blog-published",
      "occurredAt": "2026-12-03T17:19:00.000Z",
      "eventType": "other",
      "summary": "HOL published its operator write-up with the affected versions, the exposure check and the mitigations.",
      "sourceIds": [
        "hol-blog"
      ]
    }
  ],
  "coverage": [
    {
      "assertionId": "guard-evidence-pack",
      "relationship": "provides_evidence",
      "limitation": "The campaign rests on the Mercurial release page, the Mercurial security advisories and the oss-sec announcement as carried in the HOL write-up; HOL did not reproduce the flaws."
    }
  ],
  "policies": [
    {
      "policyId": "upgrade-mercurial-7-2-6",
      "purpose": "Upgrade Mercurial to 7.2.6, or install a distribution package carrying the fixes, because 7.2.6 closes all four flaws and no new upstream releases are planned for older series",
      "status": "available",
      "limitation": "Servers should also turn web.archivesubrepos off and leave it off; an upgrade does not repair archives of untrusted repositories already on disk."
    }
  ],
  "limitations": [
    "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"
  ],
  "correctionHref": "/guard/security/campaigns/mercurial-7-2-6-critical-security-release/corrections"
}
