CVE-2019-13139: OS Command Injection

Published Jul 23, 2019
·
Updated

A vulnerability was found in Docker engine versions before 18.09.4. A command injection due to a misinterpretation of the git ref command as a flag may lead to a remote code execution in build environments where an attacker has control over the build path issued to docker build.

References: https://docs.docker.com/engine/release-notes/#18094 https://github.com/moby/moby/pull/38944

Other sources

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.

Affected Software

3 affected componentsFixes available
debian/docker.io
18.09.1+dfsg1-7.1+deb10u320.10.5+dfsg1-1+deb11u220.10.24+dfsg1-120.10.25+dfsg1-2
Docker Docker<18.09.4
redhat/docker engine<18.09.4
18.09.4

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/docker.io to a version that resolves this vulnerability.

    Fixed in 18.09.1+dfsg1-7.1+deb10u3Fixed in 20.10.5+dfsg1-1+deb11u2Fixed in 20.10.24+dfsg1-1Fixed in 20.10.25+dfsg1-2
  2. Upgrade

    Upgrade redhat/docker engine to a version that resolves this vulnerability.

    Fixed in 18.09.4
  3. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 18.09.4

Event History

Jul 23, 2019
Data Sourced
via Red Hat·10:37 PM
DescriptionSeverityAffected Software
Aug 22, 2019
CVE Published
via MITRE·07:47 PM
Data Sourced
via MITRE·07:47 PM
Description
Data Sourced
08:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Nov 10, 2026
Exploit Published
via GitHub·07:51 AM

Frequently Asked Questions

1

What is CVE-2019-13139?

CVE-2019-13139 is a vulnerability in Docker before version 18.09.4 that allows an attacker to gain command execution by manipulating the build path for the "docker build" command.

2

What is the severity of CVE-2019-13139?

The severity of CVE-2019-13139 is high with a CVSS score of 8.4.

3

How does CVE-2019-13139 affect Docker?

CVE-2019-13139 affects Docker versions before 18.09.4 and can be exploited by supplying or manipulating the build path for the "docker build" command.

4

How can an attacker exploit CVE-2019-13139?

An attacker can exploit CVE-2019-13139 by manipulating the build path for the "docker build" command, allowing them to gain command execution.

5

How can I fix CVE-2019-13139?

To fix CVE-2019-13139, update Docker to version 18.09.4 or higher.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203