---
id: CVE-2008-2942
aliases:
  - GHSA-v2gw-x5jf-pgwv
  - PYSEC-2026-666
title: Mercurial Directory traversal vulnerability
summary: Mercurial Directory traversal vulnerability
severity: medium
vendor: mercurial
product: mercurial
ecosystem: pip
affected:
  - mercurial < 1.0.2
patched:
  - mercurial 1.0.2
published: '2022-05-01'
updated: '2026-07-06'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-v2gw-x5jf-pgwv'
references:
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2008-2942'
  - url: 'https://exchange.xforce.ibmcloud.com/vulnerabilities/43551'
  - url: 'https://github.com/dscho/hg'
  - url: 'https://issues.rpath.com/browse/RPL-2633'
  - url: 'http://lists.opensuse.org/opensuse-security-announce/2008-07/msg00006.html'
  - url: 'http://secunia.com/advisories/31108'
  - url: 'http://secunia.com/advisories/31110'
  - url: 'http://secunia.com/advisories/31167'
  - url: 'http://security.gentoo.org/glsa/glsa-200807-09.xml'
  - url: 'http://wiki.rpath.com/Advisories:rPSA-2008-0211'
  - url: 'http://www.openwall.com/lists/oss-security/2008/06/30/1'
  - url: 'http://www.openwall.com/lists/oss-security/2008/07/01/1'
  - url: 'http://www.securityfocus.com/archive/1/493881/100/0/threaded'
  - url: 'http://www.securityfocus.com/bid/30072'
  - url: 'http://www.selenic.com/hg/rev/87c704ac92d4'
tags:
  - osv
  - pip
epss: 0.01901
epssPercentile: 0.78492
ingestedAt: '2026-07-08T18:25:53.044Z'
---

## Overview

Directory traversal vulnerability in patch.py in Mercurial before 1.0.2 allows user-assisted attackers to modify arbitrary files via ".." (dot dot) sequences in a patch file.

## Affected packages

- `mercurial < 1.0.2`

## Remediation

Upgrade to a patched release:

- `mercurial 1.0.2`
