CVE-2019-3902 Mercurial Path Traversal/Link Following vulnerability
Attackers can use symlinks and subrepositories to bypass path checks and write files outside the repository directory.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2019-3902?
CVE-2019-3902 is a medium-severity path traversal vulnerability in Debian Debian Linux, published on 22 Apr 2019. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
A flaw was found in Mercurial before 4.9. It was possible to use symlinks and subrepositories to defeat Mercurial's path-checking logic and write files outside a repository.
Which versions are affected by CVE-2019-3902?
3 open source packages ship an affected version, including mercurial. It affects 3 products.
| Package | Affected | Fixed in |
|---|---|---|
mercurial PyPI | All versions | 4.9 |
mercurial PyPI | All versions | 4.9 |
mercurial PyPI | All versions | 4.9 |
Linux distribution packages (5)
mercurial SUSE:Linux Enterprise Module for Python 2 15 SP1 | All versions | 4.5.2-3.9.44 |
mercurial SUSE:Linux Enterprise Module for Python 2 15 SP2 | All versions | 4.5.2-3.9.44 |
mercurial SUSE:Linux Enterprise Software Development Kit 12 SP5 | All versions | 2.8.2-15.18.4 |
mercurial openSUSE:Leap 15.1 | All versions | 4.5.2-lp151.6.3.1 |
mercurial openSUSE:Leap 15.2 | All versions | 4.5.2-lp152.7.3.1 |
Products include Debian Debian Linux, Mercurial Mercurial, Redhat Enterprise Linux.
How do I fix CVE-2019-3902?
Upgrade mercurial to 4.9 or later.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2019-3902 being exploited?
There is no known exploitation of CVE-2019-3902 in the wild and no public exploit code.
Other vulnerabilities in Debian Debian Linux
Sources
Also known as ALPINE-CVE-2019-3902, DEBIAN-CVE-2019-3902, DLA-1764-1, GHSA-mq66-vcfc-8246, MGASA-2019-0250, PYSEC-2019-188 and 6 more.