NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
🐍
🐍 PyPI
Not in CISA KEV
CRITICAL severity

CVE-2017-17458 — mercurial

CRITICAL

CVE-2017-17458 is a critical-severity (CVSS 9.8) OS Command Injection vulnerability in mercurial. A fix is available for mercurial — see the affected versions and patch details below.

Mercurial vulnerable to arbitrary code injection

Also known asGHSA-6v56-cpg6-3rpxPYSEC-2017-90
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Oct 29, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
6.3%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs94th percentile — riskier than 94% of all scored CVEsHighest risk
3.06%8.88%14.7%20.5%17.2%6.3%Apr 26Aug 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

1 pkg affected
🐍mercurial

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.

Description

In Mercurial before 4.4.1, it is possible that a specially malformed repository can cause Git subrepositories to run arbitrary code in the form of a .git/hooks/post-update script checked into the repository. Typical use of Mercurial prevents construction of such repositories, but they can be created programmatically.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐍PyPImercurialall versions4.4.1pip install --upgrade 'mercurial==4.4.1'

Affected Products

2 products · 3 configurations
OS
debian linuxdebian
2 versions
7.08.0
Application
mercurialmercurial
< 4.4.1
range

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for mercurial, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update mercurial to 4.4.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2017-17458 is resolved across your whole dependency graph.

  3. Workarounds

    Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatModerate

This issue affects the versions of mercurial as shipped with Red Hat Enterprise Linux 7. Red Hat Product Security has rated this issue as having Moderate security impact. A future update may address this issue. For additional information, refer to the Issue Severity Classification:…

Workaround published by Red Hat
Disable sub-repositories
Source: Red Hat security advisory for CVE-2017-17458 (CC BY 4.0)

Frequently Asked Questions

In Mercurial before 4.4.1, it is possible that a specially malformed repository can cause Git subrepositories to run arbitrary code in the form of a .git/hooks/post-update script checked into the repository. Typical use of Mercurial prevents construction of such repositories, but they can be created programmatically.
O3 Security · Impact-Aware SCA

Is CVE-2017-17458 in your dependencies?

Find it across PyPI, including transitive dependencies.

CVE-2017-17458: mercurial RCE — Fixed in 4.4.1