Skip to content
Heist/ feed
Back to feed
High

Security advisory

Type: advisorySources: OSVCVE: CVE-2019-13139

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2019-13139
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 08:43 UTC · Revision 1

Source evidence

CVE-2019-13139

core-osv · Original source

Published 22 Aug 2019, 20:15 UTC

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.

osv:CVE-2019-13139
Complete source record
{
  "id": "0e51d4e44b0cb040e011b81a6983260bf8aa72fd6275b9665049dae5b1c344ff",
  "url": "https://osv.dev/vulnerability/CVE-2019-13139",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2019-13139",
    "summary": "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.",
    "evidence": "osv:CVE-2019-13139",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2019-13139",
      "aliases": [
        "CVE-2019-13139"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/docker-archive/docker-ce",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "d14af54266dfeb55872100e28d14231b1baafe85"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:docker:docker:*:*:*:*:enterprise:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "18.09.4"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v18.09.4-rc1",
            "v18.09.3",
            "v18.09.3-rc1",
            "v18.09.1",
            "v18.09.1-rc1",
            "v18.09.1-beta2",
            "v18.09.1-beta1",
            "v18.09.0",
            "v18.09.0-rc1",
            "v18.09.0-beta5",
            "v18.09.0-beta3",
            "v18.09.0-ce-beta1",
            "v18.09.0-ce-tp6",
            "v18.09.0-ce-tp5",
            "v18.09.0-ce-tp4",
            "v18.09.0-ce-tp3",
            "v18.09.0-ce-tp0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2019-13139.json"
          }
        },
        {
          "ranges": [
            {
              "repo": "https://github.com/docker-archive/engine",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "200b524eff60a9c95a22bc2518042ac2ff617d07"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:docker:docker:*:*:*:*:enterprise:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "18.09.4"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v18.09.4-rc1",
            "v18.09.3-rc1",
            "v18.09.3",
            "v18.09.2",
            "v18.09.1",
            "v18.09.1-rc1",
            "v18.09.1-beta2",
            "v18.09.1-beta1",
            "v18.09.0",
            "v18.09.0-rc1",
            "v18.09.0-beta5",
            "v18.09.0-beta3",
            "v18.09.0-ce-tp6",
            "v18.09.0-ce-beta1",
            "v18.09.0-ce-tp5",
            "v18.09.0-ce-tp4",
            "v18.09.0-ce-tp3",
            "v18.09.0-ce-tp0",
            "v18.06.0-ce-rc1",
            "docs-v1.12.0-rc4-2016-07-15",
            "v0.7.2",
            "v0.7.1",
            "v0.7.0",
            "v0.6.5",
            "v0.5.0",
            "v0.4.7",
            "v0.4.5",
            "v0.4.4",
            "v0.4.2",
            "v0.4.1",
            "v0.3.2",
            "v0.3.1",
            "v0.3.0",
            "v0.2.2",
            "v0.2.1",
            "v0.2.0",
            "v0.1.8",
            "v0.1.7",
            "v0.1.6",
            "v0.1.5",
            "v0.1.4",
            "v0.1.3",
            "v0.1.2",
            "v0.1.1",
            "v0.1.0",
            "upstream/0.1.3",
            "0.0.3",
            "upstream/0.1.2"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2019-13139.json"
          }
        },
        {
          "ranges": [
            {
              "repo": "https://github.com/moby/moby",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "200b524eff60a9c95a22bc2518042ac2ff617d07"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:docker:docker:*:*:*:*:enterprise:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "18.09.4"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v18.09.4-rc1",
            "v18.09.3-rc1",
            "v18.09.3",
            "v18.09.2",
            "v18.09.1",
            "v18.09.1-rc1",
            "v18.09.1-beta2",
            "v18.09.1-beta1",
            "v18.09.0",
            "v18.09.0-rc1",
            "v18.09.0-beta5",
            "v18.09.0-beta3",
            "v18.09.0-ce-tp6",
            "v18.09.0-ce-beta1",
            "v18.09.0-ce-tp5",
            "v18.09.0-ce-tp4",
            "v18.09.0-ce-tp3",
            "v18.09.0-ce-tp0",
            "v18.06.0-ce-rc1",
            "docs-v1.12.0-rc4-2016-07-15",
            "v0.7.2",
            "v0.7.1",
            "v0.7.0",
            "v0.6.5",
            "v0.5.0",
            "v0.4.7",
            "v0.4.5",
            "v0.4.4",
            "v0.4.2",
            "v0.4.1",
            "v0.3.2",
            "v0.3.1",
            "v0.3.0",
            "v0.2.2",
            "v0.2.1",
            "v0.2.0",
            "v0.1.8",
            "v0.1.7",
            "v0.1.6",
            "v0.1.5",
            "v0.1.4",
            "v0.1.3",
            "v0.1.2",
            "v0.1.1",
            "v0.1.0",
            "upstream/0.1.3",
            "0.0.3",
            "upstream/0.1.2"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2019-13139.json"
          }
        }
      ],
      "modified": "2026-10-24T10:49:48.129007806Z",
      "provider": "osv",
      "references": [
        "https://seclists.org/bugtraq/2019/Sep/21",
        "https://access.redhat.com/errata/RHBA-2019:3092",
        "https://docs.docker.com/engine/release-notes/#18094",
        "https://security.netapp.com/advisory/ntap-20190910-0001/",
        "https://www.debian.org/security/2019/dsa-4521",
        "https://github.com/moby/moby/pull/38944",
        "https://staaldraad.github.io/post/2019-07-16-cve-2019-13139-docker-build/"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2019-13139",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 441833,
  "published_at": "2019-08-22T20:15:12.003+00:00"
}