Red Hat VEX
RHVEX-CVE-2019-3902
mercurial: Path-checking logic bypass via symlinks and subrepositories
Details
Starting with version 1.5.3, Mercurial allows environment variable expansion on path names for sub repositories when creating it or cloning a parent repository, but it doesn't validate whether the final path name outside the repository root directory. An attacker can leverage this weakness using a combination of symbolic links and environment variables to craft a tampered repository, leading Mercurial to write files outside the repository as long the destination location is empty.
Affected packages
| Ecosystem | Package | Affected versions |
|---|---|---|
| Red Hat:enterprise_linux:7 | emacs-mercurial | All versions, will not be fixed |
| Red Hat:enterprise_linux:7 | emacs-mercurial-el | All versions, will not be fixed |
| Red Hat:enterprise_linux:7 | mercurial | All versions, will not be fixed |
| Red Hat:enterprise_linux:7 | mercurial-hgk | All versions, will not be fixed |
| Red Hat:enterprise_linux:8 | mercurial | All versions, will not be fixed |
| Red Hat:enterprise_linux:8 | mercurial-chg | All versions, will not be fixed |
| Red Hat:enterprise_linux:8 | mercurial-hgk | All versions, will not be fixed |