cve.bz

CVE-2019-13139 docker docker: OS Command Injection

8.4 highExploit referenceEPSS 2.0%Fix available

High (8.4) in docker docker. EPSS 2.0% estimated probability of exploitation activity in the next 30 days.

On this page
In Docker before 18.09.4, an attacker who is capable of supplying or manipulating the build path for the "docker build" command would be able to gain command execution. An issue exists in the way "docker build" processes remote git URLs, and results in command injection into the underlying "git clone" command, leading to code execution in the context of the user executing the "docker build" command. This occurs because git ref can be misinterpreted as a flag.

Severity

CVSS 3.0

8.4 high
CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
2.0% (unchanged from 2.0% a week ago; 2.0% 30 days ago) estimated probability of exploitation activity in the next 30 days; 82nd percentile. Scored 2026-11-21. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-78 Improper Neutralization of Special Elements used in an OS Command (OS Command Injection)
OWASP Top 10
A05:2025 Injection
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-13139 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2019-13139?via=ask-ai-copy and https://cve.bz/cve/CVE-2019-13139?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-13139 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
docker:dockerbefore 18.09.4

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian10docker.io18.09.1+dfsg1-7.1+deb10u1DSA-4521-1
Debian12, 13, 14docker.io18.09.1+dfsg1-8DEBIAN-CVE-2019-13139
Red Hatrhel_extras_other:7docker, docker-client, docker-common and 6 more2:1.13.1-104.git4ef4b30.el7RHBA-2019:3092

From the distributions' data via OSV.dev: the Debian Security Tracker; Red Hat Security Data © Red Hat, Inc., CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Red Hat.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

Both 1.12 and 1.13 versions of docker shipped with Red Hat Enterprise Linux Extras and OpenShift Container Platform 3 are vulnerable to this flaw, though they are less impacted than upstream. The injected command options passed to `docker build` through the docker build path are handled by `git checkout` rather than `git fetch`, which provides limited options for an attacker to exploit. It is unlikely that code execution is possible, though it cannot be ruled out entirely.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 7 Extrasdocker-2:1.13.1-104.git4ef4b30.el7Fixed 2019-10-16RHBA-2019:3092
Red Hat OpenShift Container Platform 3.6dockerOut of support scope
Red Hat OpenShift Container Platform 3.7dockerOut of support scope

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-13139.

GitHub PoC

Repositories on GitHub named after this CVE or listed for it by the PoC-in-GitHub index. For those marked Harbor Check: matches CVE, Flawharbor read the code and found it implements this CVE's exploitation technique: read, not run, and its dependencies only checked for warning signs, so a pointer and no guarantee. The rest are unverified: some hold a working proof of concept, some nothing useful, and some malware made to look like one. Read the code before you run any of it. How Harbor Check reads them, and what it found.

Attack patterns (CAPEC)

  • CAPEC-6 Argument Injection Likelihood: High · Severity: High
  • CAPEC-15 Command Delimiters Likelihood: High · Severity: High
  • CAPEC-43 Exploiting Multiple Input Interpretation Layers Likelihood: Medium · Severity: High
  • CAPEC-88 OS Command Injection Likelihood: High · Severity: High
  • CAPEC-108 Command Line Execution through SQL Injection Likelihood: Low · Severity: Very High

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

References

Check your stackJSON