cve.bz

CVE-2019-3902 Link Following

5.9 mediumEPSS 1.4%Fix available

Medium (5.9). EPSS 1.4% estimated probability of exploitation activity in the next 30 days. Fixed in mercurial 4.9.

On this page
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.

Severity

CVSS 3.0

5.9 medium
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
EPSS
1.4% (unchanged from 1.4% a week ago; 1.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 72nd percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWEs
CWE-59 Improper Link Resolution Before File Access (Link Following)
CWE-22 Improper Limitation of a Pathname to a Restricted Directory (Path traversal)
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2019-3902 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2019-3902?via=ask-ai-copy and https://cve.bz/cve/CVE-2019-3902?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2019-3902 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
mercurial:mercurialbefore 4.9
debian:debian_linux8.0
redhat:enterprise_linux7.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-mq66-vcfc-8246PyPImercurial<4.94.9
PYSEC-2019-188PyPImercurial<4.94.9

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian8mercurial3.1.2-2+deb8u7DLA-1764-1
Debian9mercurial4.0-1+deb9u2DLA-2293-1
Debian12, 13, 14mercurial4.9-1DEBIAN-CVE-2019-3902
Ubuntu18.04:LTSmercurial4.5.3-1ubuntu2.2UBUNTU-CVE-2019-3902 USN-5102-1
UbuntuPro:14.04:LTSmercurial2.8.2-1ubuntu1.4+esm1UBUNTU-CVE-2019-3902 USN-5102-2
UbuntuPro:16.04:LTSmercurial3.7.3-1ubuntu1.2+esm2UBUNTU-CVE-2019-3902 USN-5102-2
SUSELinux Enterprise Module for Python 2 15 SP1mercurial4.5.2-3.9.44SUSE-SU-2020:1709-1
SUSELinux Enterprise Module for Python 2 15 SP2mercurial4.5.2-3.9.44SUSE-SU-2020:1709-2
SUSELinux Enterprise Software Development Kit 12 SP5mercurial2.8.2-15.18.4SUSE-SU-2020:3003-1
openSUSELeap 15.1mercurial4.5.2-lp151.6.3.1openSUSE-SU-2020:0869-1
openSUSELeap 15.2mercurial4.5.2-lp152.7.3.1openSUSE-SU-2020:0880-1
openSUSETumbleweedmercurial5.9.1-2.1openSUSE-SU-2024:10586-1
Alpinev3.7mercurial4.5.2-r1ALPINE-CVE-2019-3902
Alpinev3.8mercurial4.6.1-r1ALPINE-CVE-2019-3902
Alpinev3.9, v3.10, v3.11 and 13 moremercurial4.9-r0ALPINE-CVE-2019-3902

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

This issue affects the versions of mercurial as shipped with Red Hat Enterprise Linux 7. Red Hat Product Security has rated this issue as having a security impact of Moderate. A future update may address this issue. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.

ProductPackageStateAdvisory
Red Hat Ansible Tower 3mercurialNot affected
Red Hat Enterprise Linux 6mercurialNot affected
Red Hat Enterprise Linux 7mercurialWill not fix
Red Hat Enterprise Linux 8mercurialWill not fix

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2019-3902.

Attack patterns (CAPEC)

  • CAPEC-17 Using Malicious Files Likelihood: High · Severity: Very High
  • CAPEC-35 Leverage Executable Code in Non-Executable Files Likelihood: High · Severity: Very High
  • CAPEC-76 Manipulating Web Input to File System Calls Likelihood: High · Severity: Very High
  • CAPEC-132 Symlink Attack Likelihood: Low · Severity: High
  • CAPEC-64 Using Slashes and URL Encoding Combined to Bypass Validation Logic Likelihood: High · Severity: High
  • CAPEC-78 Using Escaped Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-79 Using Slashes in Alternate Encoding Likelihood: High · Severity: High
  • CAPEC-126 Path Traversal Likelihood: High · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON