Home / Mercurial / Mercurial / CVE-2008-2942
CVE-2008-2942: is it exploited, and which versions of Mercurial are affected and fixed?
CVE-2008-2942 is a path traversal (reading or writing files outside the intended folder) vulnerability in Mercurial. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 09:08 UTC). Affected: mercurial before 1.0.2 (GitHub advisory GHSA-v2gw-x5jf-pgwv). Fixed in 1.0.2 (GitHub advisory GHSA-v2gw-x5jf-pgwv). Severity: Medium (6.8, CVSS 2.0, from NVD).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 09:08 UTC, CVE record November 19, 2026, 07:20 UTC and NVD November 19, 2026, 08:52 UTC.
What is CVE-2008-2942?
Directory traversal vulnerability in patch.py in Mercurial 1.0.1 allows user-assisted attackers to modify arbitrary files via ".." (dot dot) sequences in a patch file.
From the CVE record by mitre, last updated August 7, 2024, 09:21 UTC.
Which packages are affected, and in which version is each fixed?
| Ecosystem | Package | Affected | Fixed in | Advisory |
|---|---|---|---|---|
| PyPI | mercurial | < 1.0.2 | 1.0.2 | GHSA-v2gw-x5jf-pgwv |
GitHub Advisory Database, reviewed advisories (CC BY 4.0); advisory updated September 22, 2023. Summary: Mercurial Directory traversal vulnerability.
Which products and versions does the NVD list as affected?
| Vendor | Product | Versions | Type |
|---|---|---|---|
| mercurial | mercurial | 1.0.1 | application |
NVD analysis (status Modified), last modified June 16, 2026, 22:54 UTC.
How severe is CVE-2008-2942?
| Score | Version | Vector | Source |
|---|---|---|---|
| Medium 6.8 | CVSS 2.0 | AV:N/AC:M/Au:N/C:P/I:P/A:P | NVD |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2008-2942 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- EPSS
- 1.88% probability of exploitation activity in the next 30 days, percentile 80.1 (FIRST EPSS, scores of December 2, 2026)
What kind of flaw is it?
- CWE-22 Improper Limitation of a Pathname to a Restricted Directory
Where are the vendor advisories and references?
- http://www.selenic.com/hg/rev/87c704ac92d4 x_refsource_CONFIRM
- mercurial-patch-directory-traversal(43551) vdb-entry, x_refsource_XF
- 30072 vdb-entry, x_refsource_BID
- https://issues.rpath.com/browse/RPL-2633 x_refsource_CONFIRM
- [oss-security] 20080630 CVE id request mercurial:Insufficient input validation mailing-list, x_refsource_MLIST
- SUSE-SR:2008:015 vendor-advisory, x_refsource_SUSE
- http://wiki.rpath.com/Advisories:rPSA-2008-0211 x_refsource_CONFIRM
- 20080703 rPSA-2008-0211-1 mercurial mercurial-hgk mailing-list, x_refsource_BUGTRAQ
- GLSA-200807-09 vendor-advisory, x_refsource_GENTOO
- [oss-security] 20080701 Re: CVE id request mercurial:Insufficient input validation mailing-list, x_refsource_MLIST
- 31110 third-party-advisory, x_refsource_SECUNIA
- 31167 third-party-advisory, x_refsource_SECUNIA
- 31108 third-party-advisory, x_refsource_SECUNIA
When was it published, and where is the official record?
- Reserved
- June 30, 2008
- Published
- June 30, 2008, 20:00 UTC
- CVE record updated
- August 7, 2024, 09:21 UTC by mitre
- NVD
- Modified, last modified June 16, 2026, 22:54 UTC
- Last checked
- CVE list November 19, 2026, 07:20 UTC; NVD November 19, 2026, 08:52 UTC; KEV December 3, 2026, 09:08 UTC; EPSS December 2, 2026
- Official record
- cve.org · NVD
What other CVEs affect Mercurial?
- Feb 12, 2020CVE-2014-9390 Git-scm Git: improper input validation
- Oct 29, 2019CVE-2010-4237 mercurial: improper certificate validation
- Oct 4, 2018CVE-2018-17983 Mercurial: out-of-bounds read
- Jul 6, 2018CVE-2018-13348 Mercurial: improper input validation
- Jul 6, 2018CVE-2018-13347 Mercurial: integer overflow
- Jul 6, 2018CVE-2018-13346 Mercurial: improper input validation
- Mar 14, 2018CVE-2018-1000132 Mercurial: incorrect permissions on a critical resource
- Dec 7, 2017CVE-2017-17458 Mercurial: OS command injection
Questions about CVE-2008-2942
Is CVE-2008-2942 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 09:08 UTC. FIRST's EPSS gives it a 1.88% chance of exploitation activity in the next 30 days (scores of December 2, 2026).
Which versions of Mercurial are affected by CVE-2008-2942?
mercurial before 1.0.2, per the GitHub advisory GHSA-v2gw-x5jf-pgwv. The tables above give every range the sources list.
Which version fixes CVE-2008-2942?
1.0.2, per the GitHub advisory GHSA-v2gw-x5jf-pgwv. Check the vendor's advisory before you rely on it.
How severe is CVE-2008-2942?
Medium (6.8, CVSS 2.0, from NVD). The severity table above shows each score with its source.
Where is the official record of CVE-2008-2942?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.