GLSA-202003-21 : runC: Multiple vulnerabilities - Nessus

High   Plugin ID: 134598

This page contains detailed information about the GLSA-202003-21 : runC: Multiple vulnerabilities Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 134598
Name: GLSA-202003-21 : runC: Multiple vulnerabilities
Filename: gentoo_GLSA-202003-21.nasl
Vulnerability Published: 2019-02-11
This Plugin Published: 2020-03-16
Last Modification Time: 2021-07-01
Plugin Version: 1.5
Plugin Type: local
Plugin Family: Gentoo Local Security Checks
Dependencies: ssh_get_info.nasl
Required KB Items [?]: Host/Gentoo/qpkg-list, Host/Gentoo/release, Host/local_checks_enabled

Vulnerability Information


Severity: High
Vulnerability Published: 2019-02-11
Patch Published: 2020-03-15
CVE [?]: CVE-2019-5736, CVE-2019-16884, CVE-2019-19921
CPE [?]: cpe:/o:gentoo:linux, p-cpe:/a:gentoo:linux:runc
Exploited by Malware: True

Synopsis

The remote Gentoo host is missing one or more security-related patches.

Description

The remote host is affected by the vulnerability described in GLSA-202003-21 (runC: Multiple vulnerabilities)

Multiple vulnerabilities have been discovered in runC. Please review the CVE identifiers referenced below for details. Impact :

An attacker, by running a malicious Docker image, could escape the container, bypass security restrictions, escalate privileges or cause a Denial of Service condition. Workaround :

There is no known workaround at this time.

Solution

All runC users should upgrade to the latest version: # emerge --sync # emerge --ask --oneshot --verbose '>=app-emulation/runc-1.0.0_rc10'

Public Exploits


Target Network Port(s): N/A
Target Asset(s): N/A
Exploit Available: True (Metasploit Framework, Exploit-DB, GitHub)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the GLSA-202003-21 : runC: Multiple vulnerabilities vulnerability:

  1. Metasploit: exploit/linux/local/docker_runc_escape
    [Docker Container Escape Via runC Overwrite]
  2. Exploit-DB: exploits/linux/local/46369.md
    [EDB-46369: runc < 1.0-rc6 (Docker < 18.09.2) - Container Breakout (2)]
  3. GitHub: https://github.com/0xsyr0/OSCP
    [CVE-2019-5736]
  4. GitHub: https://github.com/3hydraking/CVE-2019-5736
    [CVE-2019-5736]
  5. GitHub: https://github.com/4n0nym0u5dk/CVE-2019-5736
    [CVE-2019-5736]
  6. GitHub: https://github.com/Asbatel/CVE-2019-5736_POC
    [CVE-2019-5736]
  7. GitHub: https://github.com/BBRathnayaka/POC-CVE-2019-5736
    [CVE-2019-5736]
  8. GitHub: https://github.com/Billith/CVE-2019-5736-PoC
    [CVE-2019-5736]
  9. GitHub: https://github.com/BurlakaR/tpc
    [CVE-2019-5736]
  10. GitHub: https://github.com/EvilAnne/2019-Read-article
    [CVE-2019-5736]
  11. GitHub: https://github.com/Keramas/Blowhole
    [CVE-2019-5736]
  12. GitHub: https://github.com/Lee-SungYoung/cve-2019-5736-study
    [CVE-2019-5736]
  13. GitHub: https://github.com/Malamunza/Nvedia
    [CVE-2019-5736]
  14. GitHub: https://github.com/Malamunza/update2
    [CVE-2019-5736]
  15. GitHub: https://github.com/Metarget/awesome-cloud-native-security
    [CVE-2019-5736]
  16. GitHub: https://github.com/Metarget/cloud-native-security-book
    [CVE-2019-5736]
  17. GitHub: https://github.com/Metarget/k0otkit
    [CVE-2019-5736]
  18. GitHub: https://github.com/Metarget/metarget
    [CVE-2019-5736]
  19. GitHub: https://github.com/PercussiveElbow/docker-escape-tool
    [CVE-2019-5736]
  20. GitHub: https://github.com/Pray3r/cloud-native-security
    [CVE-2019-5736]
  21. GitHub: https://github.com/Retr0-ll/littleterm
    [CVE-2019-5736]
  22. GitHub: https://github.com/SexyBeast233/SecBooks
    [CVE-2019-5736]
  23. GitHub: https://github.com/UCloudDocs/uk8s
    [CVE-2019-5736]
  24. GitHub: https://github.com/UCloudDoc-Team/uk8s
    [CVE-2019-5736]
  25. GitHub: https://github.com/aishee/DOCKER-2019-5736
    [CVE-2019-5736]
  26. GitHub: https://github.com/b3d3c/poc-cve-2019-5736
    [CVE-2019-5736]
  27. GitHub: https://github.com/bitdefender/vbh_sample
    [CVE-2019-5736]
  28. GitHub: https://github.com/brompwnie/botb
    [CVE-2019-5736]
  29. GitHub: https://github.com/cdk-team/CDK
    [CVE-2019-5736]
  30. GitHub: https://github.com/chosam2/cve-2019-5736-poc
    [CVE-2019-5736]
  31. GitHub: https://github.com/cometkim/awesome-list
    [CVE-2019-5736]
  32. GitHub: https://github.com/fahmifj/Docker-breakout-runc
    [CVE-2019-5736: Modified version of CVE-2019-5736-PoC by Frichetten]
  33. GitHub: https://github.com/feexd/pocs/blob/master/CVE-2019-5736/exploit.c
    [CVE-2019-5736]
  34. GitHub: https://github.com/geropl/CVE-2019-5736
    [CVE-2019-5736]
  35. GitHub: https://github.com/hacking-kubernetes/hacking-kubernetes.info
    [CVE-2019-5736]
  36. GitHub: https://github.com/heroku/bheu19-attacking-cloud-builds
    [CVE-2019-5736]
  37. GitHub: https://github.com/jeansgit/Pentest
    [CVE-2019-5736]
  38. GitHub: https://github.com/k4u5h41/CVE-2019-5736
    [CVE-2019-5736]
  39. GitHub: https://github.com/kaosagnt/ansible-everyday
    [CVE-2019-5736]
  40. GitHub: https://github.com/kdada/imkira.com
    [CVE-2019-5736]
  41. GitHub: https://github.com/kindredgroupsec/venom
    [CVE-2019-5736]
  42. GitHub: https://github.com/likescam/CVE-2019-5736
    [CVE-2019-5736]
  43. GitHub: https://github.com/likescam/cve-2019-5736-poc
    [CVE-2019-5736]
  44. GitHub: https://github.com/lp008/Hack-readme
    [CVE-2019-5736]
  45. GitHub: https://github.com/m4r1k/k8s_5g_lab
    [CVE-2019-5736]
  46. GitHub: https://github.com/manoelt/50M_CTF_Writeup
    [CVE-2019-5736]
  47. GitHub: https://github.com/mrzzy/govware-2019-demos
    [CVE-2019-5736]
  48. GitHub: https://github.com/myugan/awesome-docker-security
    [CVE-2019-5736]
  49. GitHub: https://github.com/psifertex/ctf-vs-the-real-world
    [CVE-2019-5736]
  50. GitHub: https://github.com/pyperanger/dockerevil
    [CVE-2019-5736]
  51. GitHub: https://github.com/rancher/runc-cve
    [CVE-2019-5736]
  52. GitHub: https://github.com/reni2study/Cloud-Native-Security2
    [CVE-2019-5736]
  53. GitHub: https://github.com/sandbornm/HardenDocker
    [CVE-2019-5736]
  54. GitHub: https://github.com/saucer-man/exploit
    [CVE-2019-5736]
  55. GitHub: https://github.com/si1ent-le/CVE-2019-5736
    [CVE-2019-5736]
  56. GitHub: https://github.com/stillan00b/CVE-2019-5736
    [CVE-2019-5736]
  57. GitHub: https://github.com/takumak/cve-2019-5736-reproducer
    [CVE-2019-5736]
  58. GitHub: https://github.com/twistlock/whoc
    [CVE-2019-5736]
  59. GitHub: https://github.com/waqeen/cyber_security21
    [CVE-2019-5736]
  60. GitHub: https://github.com/yyqs2008/CVE-2019-5736-PoC-2
    [CVE-2019-5736]
  61. GitHub: https://github.com/zhonghual1206/biyi-sealidentify
    [CVE-2019-5736]
  62. GitHub: https://nvd.nist.gov/vuln/detail/CVE-2019-5736
    [CVE-2019-5736: poc of CVE-2019-5736]
  63. GitHub: https://github.com/Metarget/awesome-cloud-native-security
    [CVE-2019-16884]
  64. GitHub: https://github.com/Metarget/metarget
    [CVE-2019-16884]
  65. GitHub: https://github.com/PRISHIta123/Securing_Open_Source_Components_on_Containers
    [CVE-2019-16884]
  66. GitHub: https://github.com/hacking-kubernetes/hacking-kubernetes.info
    [CVE-2019-16884]
  67. GitHub: https://github.com/ssst0n3/docker_archive
    [CVE-2019-16884]
  68. GitHub: https://github.com/Metarget/awesome-cloud-native-security
    [CVE-2019-19921]
  69. GitHub: https://github.com/offensive-security/exploitdb-bin-sploits/blob/master/bin-sploits/46369.zip
    [EDB-46369]
  70. GitHub: https://github.com/agppp/cve-2019-5736-poc
    [CVE-2019-5736: Getshell test]
  71. GitHub: https://github.com/epsteina16/Docker-Escape-Miner
    [CVE-2019-5736: Code sample for using exploit CVE-2019-5736 to mine bitcoin with no association to ...]
  72. GitHub: https://github.com/Frichetten/CVE-2019-5736-PoC
    [CVE-2019-5736: PoC for CVE-2019-5736]
  73. GitHub: https://github.com/GiverOfGifts/CVE-2019-5736-Custom-Runtime
    [CVE-2019-5736: CVE-2019-5736 implemented in a self-written container runtime to understand the ...]
  74. GitHub: https://github.com/jakubkrawczyk/cve-2019-5736
    [CVE-2019-5736: My attempt to create PoC of CVE-2019-5736 (Docker escape)]
  75. GitHub: https://github.com/jas502n/CVE-2019-5736
    [CVE-2019-5736: Runc容器逃逸漏洞预警]
  76. GitHub: https://github.com/milloni/cve-2019-5736-exp
    [CVE-2019-5736: Exploit for the CVE-2019-5736 runc vulnerability]
  77. GitHub: https://github.com/panzouh/Docker-Runc-Exploit
    [CVE-2019-5736: Docker runc CVE-2019-5736 exploit Dockerfile. Credits : ...]
  78. GitHub: https://github.com/q3k/cve-2019-5736-poc
    [CVE-2019-5736: Unweaponized Proof of Concept for CVE-2019-5736 (Docker escape)]
  79. GitHub: https://github.com/RyanNgWH/CVE-2019-5736-POC
    [CVE-2019-5736: Proof of concept code for breaking out of docker via runC]
  80. GitHub: https://github.com/shen54/IT19172088
    [CVE-2019-5736]
  81. GitHub: https://github.com/twistlock/RunC-CVE-2019-5736
    [CVE-2019-5736: CVE-2019-5736 POCs]
  82. GitHub: https://github.com/zyriuse75/CVE-2019-5736-PoC
    [CVE-2019-5736]

Before running any exploit against any system, make sure you are authorized by the owner of the target system(s) to perform such activity. In any other case, this would be considered as an illegal activity.

WARNING: Beware of using unverified exploits from sources such as GitHub or Exploit-DB. These exploits and PoCs could contain malware. For more information, see how to use exploits safely.

Risk Information


CVSS V2 Vector [?]: AV:N/AC:M/Au:N/C:C/I:C/A:C/E:H/RL:OF/RC:C
CVSS Base Score:9.3 (High)
Impact Subscore:10.0
Exploitability Subscore:8.6
CVSS Temporal Score:8.1 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:8.1 (High)
CVSS V3 Vector: CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H/E:H/RL:O/RC:C
CVSS Base Score:8.6 (High)
Impact Subscore:6.0
Exploitability Subscore:1.8
CVSS Temporal Score:8.2 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:8.2 (High)

Go back to menu.

Plugin Source


This is the gentoo_GLSA-202003-21.nasl nessus plugin source code. This script is Copyright (C) 2020-2021 and is owned by Tenable, Inc. or an Affiliate thereof.

#
# (C) Tenable Network Security, Inc.
#
# The descriptive text and package checks in this plugin were
# extracted from Gentoo Linux Security Advisory GLSA 202003-21.
#
# The advisory text is Copyright (C) 2001-2021 Gentoo Foundation, Inc.
# and licensed under the Creative Commons - Attribution / Share Alike 
# license. See http://creativecommons.org/licenses/by-sa/3.0/
#

include("compat.inc");

if (description)
{
  script_id(134598);
  script_version("1.5");
  script_set_attribute(attribute:"plugin_modification_date", value:"2021/07/01");

  script_cve_id("CVE-2019-16884", "CVE-2019-19921", "CVE-2019-5736");
  script_xref(name:"GLSA", value:"202003-21");

  script_name(english:"GLSA-202003-21 : runC: Multiple vulnerabilities");
  script_summary(english:"Checks for updated package(s) in /var/db/pkg");

  script_set_attribute(
    attribute:"synopsis",
    value:
"The remote Gentoo host is missing one or more security-related
patches."
  );
  script_set_attribute(
    attribute:"description",
    value:
"The remote host is affected by the vulnerability described in GLSA-202003-21
(runC: Multiple vulnerabilities)

    Multiple vulnerabilities have been discovered in runC. Please review the
      CVE identifiers referenced below for details.
  
Impact :

    An attacker, by running a malicious Docker image, could escape the
      container, bypass security restrictions, escalate privileges or cause a
      Denial of Service condition.
  
Workaround :

    There is no known workaround at this time."
  );
  script_set_attribute(
    attribute:"see_also",
    value:"https://security.gentoo.org/glsa/202003-21"
  );
  script_set_attribute(
    attribute:"solution",
    value:
"All runC users should upgrade to the latest version:
      # emerge --sync
      # emerge --ask --oneshot --verbose '>=app-emulation/runc-1.0.0_rc10'"
  );
  script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:C/I:C/A:C");
  script_set_cvss_temporal_vector("CVSS2#E:H/RL:OF/RC:C");
  script_set_cvss3_base_vector("CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:H/RL:O/RC:C");
  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"exploited_by_malware", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'Docker Container Escape Via runC Overwrite');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:gentoo:linux:runc");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:gentoo:linux");

  script_set_attribute(attribute:"vuln_publication_date", value:"2019/02/11");
  script_set_attribute(attribute:"patch_publication_date", value:"2020/03/15");
  script_set_attribute(attribute:"plugin_publication_date", value:"2020/03/16");
  script_set_attribute(attribute:"generated_plugin", value:"current");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_copyright(english:"This script is Copyright (C) 2020-2021 and is owned by Tenable, Inc. or an Affiliate thereof.");
  script_family(english:"Gentoo Local Security Checks");

  script_dependencies("ssh_get_info.nasl");
  script_require_keys("Host/local_checks_enabled", "Host/Gentoo/release", "Host/Gentoo/qpkg-list");

  exit(0);
}


include("audit.inc");
include("global_settings.inc");
include("qpkg.inc");

if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
if (!get_kb_item("Host/Gentoo/release")) audit(AUDIT_OS_NOT, "Gentoo");
if (!get_kb_item("Host/Gentoo/qpkg-list")) audit(AUDIT_PACKAGE_LIST_MISSING);


flag = 0;

if (qpkg_check(package:"app-emulation/runc", unaffected:make_list("ge 1.0.0_rc10"), vulnerable:make_list("lt 1.0.0_rc10"))) flag++;

if (flag)
{
  if (report_verbosity > 0) security_hole(port:0, extra:qpkg_report_get());
  else security_hole(0);
  exit(0);
}
else
{
  tested = qpkg_tests_get();
  if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
  else audit(AUDIT_PACKAGE_NOT_INSTALLED, "runC");
}

The latest version of this script can be found in these locations depending on your platform:

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/gentoo_GLSA-202003-21.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\gentoo_GLSA-202003-21.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/gentoo_GLSA-202003-21.nasl

Go back to menu.

How to Run


Here is how to run the GLSA-202003-21 : runC: Multiple vulnerabilities as a standalone plugin via the Nessus web user interface (https://localhost:8834/):

  1. Click to start a New Scan.
  2. Select Advanced Scan.
  3. Navigate to the Plugins tab.
  4. On the top right corner click to Disable All plugins.
  5. On the left side table select Gentoo Local Security Checks plugin family.
  6. On the right side table select GLSA-202003-21 : runC: Multiple vulnerabilities plugin ID 134598.
  7. Specify the target on the Settings tab and click to Save the scan.
  8. Run the scan.

Here are a few examples of how to run the plugin in the command line. Note that the examples below demonstrate the usage on the Linux / Unix platform.

Basic usage:

/opt/nessus/bin/nasl gentoo_GLSA-202003-21.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a gentoo_GLSA-202003-21.nasl -t <IP/HOST>

Run the plugin with trace script execution written to the console (useful for debugging):

/opt/nessus/bin/nasl -T - gentoo_GLSA-202003-21.nasl -t <IP/HOST>

Run the plugin with using a state file for the target and updating it (useful for running multiple plugins on the target):

/opt/nessus/bin/nasl -K /tmp/state gentoo_GLSA-202003-21.nasl -t <IP/HOST>

Go back to menu.

References


GLSA | Gentoo Linux Security Advisory: See also: Similar and related Nessus plugins:
  • 130391 - SUSE SLES15 Security Update : runc (SUSE-SU-2019:2810-1)
  • 130448 - openSUSE Security Update : docker-runc (openSUSE-2019-2418)
  • 130577 - openSUSE Security Update : docker-runc (openSUSE-2019-2434)
  • 131217 - RHEL 8 : OpenShift Container Platform 4.1.24 runc (RHSA-2019:3940)
  • 131678 - RHEL 8 : OpenShift Container Platform 4.2 runc (RHSA-2019:4074)
  • 132234 - RHEL 8 : container-tools:rhel8 (RHSA-2019:4269) (Ping Flood) (Reset Flood)
  • 132255 - RancherOS < 1.5.1 Local Command Execution
  • 132667 - Oracle Linux 8 : container-tools:ol8 (ELSA-2019-4269) (Ping Flood) (Reset Flood)
  • 132743 - SUSE SLED15 / SLES15 Security Update : containerd, docker, docker-runc, golang-github-docker-libnetwork (SUSE-SU-2020:0035-1)
  • 132914 - openSUSE Security Update : containerd / docker / docker-runc / etc (openSUSE-2020-45)
  • 133569 - Fedora 31 : 2:runc (2020-46ecc60897)
  • 133581 - Fedora 30 : 2:runc (2020-b2c1f6cc75)
  • 133602 - SUSE SLED15 / SLES15 Security Update : docker-runc (SUSE-SU-2020:0375-1)
  • 133714 - openSUSE Security Update : docker-runc (openSUSE-2020-219)
  • 134367 - Ubuntu 18.04 LTS / 19.10 : runc vulnerabilities (USN-4297-1)
  • 134391 - RHEL 8 : OpenShift Container Platform 4.2.22 runc (RHSA-2020:0688)
  • 134557 - RHEL 8 : OpenShift Container Platform 4.1.38 (RHSA-2020:0695)
  • 134836 - RHEL 7 : runc (RHSA-2020:0942)
  • 135084 - RHEL 7 : docker (RHSA-2020:1234)
  • 135281 - SUSE SLES15 Security Update : runc (SUSE-SU-2020:0944-1)
  • 135769 - RHEL 7 : OpenShift Container Platform 4.3.13 runc (RHSA-2020:1485)
  • 135934 - Amazon Linux AMI : runc (ALAS-2020-1358)
  • 136053 - RHEL 8 : container-tools:rhel8 (RHSA-2020:1650)
  • 136552 - Photon OS 1.0: Docker PHSA-2020-1.0-0292
  • 136568 - Photon OS 2.0: Docker PHSA-2020-2.0-0241
  • 136576 - Photon OS 3.0: Docker PHSA-2020-3.0-0088
  • 137201 - Photon OS 3.0: Runc PHSA-2020-3.0-0102
  • 137821 - Oracle Linux 7 : docker-cli / docker-engine (ELSA-2020-5739)
  • 139863 - Photon OS 2.0: Runc PHSA-2020-2.0-0275
  • 143962 - NewStart CGSL CORE 5.04 / MAIN 5.04 : docker-ce Multiple Vulnerabilities (NS-SA-2020-0082)
  • 145642 - CentOS 8 : container-tools:rhel8 (CESA-2019:0975)
  • 145671 - CentOS 8 : container-tools:rhel8 (CESA-2019:4269)
  • 145798 - CentOS 8 : container-tools:rhel8 (CESA-2020:1650)
  • 147293 - NewStart CGSL CORE 5.04 / MAIN 5.04 : containerd.io Multiple Vulnerabilities (NS-SA-2021-0006)

Version


This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file gentoo_GLSA-202003-21.nasl version 1.5. For more plugins, visit the Nessus Plugin Library.

Go back to menu.