Lucene search

K
nessusThis script is Copyright (C) 2022-2024 and is owned by Tenable, Inc. or an Affiliate thereof.CRI-O_CVE-2022-0811.NASL
HistoryMar 21, 2022 - 12:00 a.m.

CRI-O package 1.19.x < 1.19.6 / 1.20.x < 1.20.7 / 1.21.x < 1.21.6 / 1.22.x < 1.22.3 / 1.23.x < 1.23.2 Arbitrary Code Execution (CVE-2022-0811)

2022-03-2100:00:00
This script is Copyright (C) 2022-2024 and is owned by Tenable, Inc. or an Affiliate thereof.
www.tenable.com
132
arbitrary code execution
cri-o package
cve-2022-0811
kernel parameter

CVSS2

9

Attack Vector

NETWORK

Attack Complexity

LOW

Authentication

SINGLE

Confidentiality Impact

COMPLETE

Integrity Impact

COMPLETE

Availability Impact

COMPLETE

AV:N/AC:L/Au:S/C:C/I:C/A:C

CVSS3

8.8

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

LOW

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

AI Score

8.9

Confidence

High

EPSS

0.001

Percentile

46.8%

The version of the CRI-O package installed on the remote host is 1.19.x prior to 1.19.6, 1.20.x prior to 1.20.7, 1.21.x prior to 1.21.6, 1.22.x prior to 1.22.3, or 1.23.x prior to 1.23.2. It is, therefore, affected by an arbitrary code execution vulnerability via abusing the β€˜kernel.core_pattern’ kernel parameter.

Note that Nessus has not tested for this issue but has instead relied only on the application’s self-reported version number.

#%NASL_MIN_LEVEL 70300

##
# (C) Tenable Network Security, Inc.
##

include('deprecated_nasl_level.inc');
include('compat.inc');

if (description)
{
  script_id(159113);
  script_version("1.6");
  script_set_attribute(attribute:"plugin_modification_date", value:"2024/05/06");

  script_cve_id("CVE-2022-0811");
  script_xref(name:"CEA-ID", value:"CEA-2022-0010");

  script_name(english:"CRI-O package 1.19.x < 1.19.6 / 1.20.x < 1.20.7 / 1.21.x < 1.21.6 / 1.22.x < 1.22.3 / 1.23.x < 1.23.2 Arbitrary Code Execution (CVE-2022-0811)");

  script_set_attribute(attribute:"synopsis", value:
"A package installed on the remote host is affected by arbitrary code execution.");
  script_set_attribute(attribute:"description", value:
"The version of the CRI-O package installed on the remote host is 1.19.x prior to 1.19.6, 1.20.x prior to 1.20.7, 1.21.x
prior to 1.21.6, 1.22.x prior to 1.22.3, or 1.23.x prior to 1.23.2. It is, therefore, affected by an arbitrary code
execution vulnerability via abusing the 'kernel.core_pattern' kernel parameter.

Note that Nessus has not tested for this issue but has instead relied only on the application's self-reported version
number.");
  script_set_attribute(attribute:"see_also", value:"https://github.com/cri-o/cri-o/security/advisories/GHSA-6x2m-w449-qwx7");
  # https://www.crowdstrike.com/blog/cr8escape-new-vulnerability-discovered-in-cri-o-container-engine-cve-2022-0811/
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?f56a5f3f");
  script_set_attribute(attribute:"solution", value:
"Update to version 1.19.6, 1.20.7, 1.21.6, 1.22.3, 1.23.2 or later.");
  script_set_attribute(attribute:"agent", value:"unix");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:S/C:C/I:C/A:C");
  script_set_cvss_temporal_vector("CVSS2#E:POC/RL:OF/RC:C");
  script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:P/RL:O/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2022-0811");

  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2022/03/15");
  script_set_attribute(attribute:"patch_publication_date", value:"2022/03/15");
  script_set_attribute(attribute:"plugin_publication_date", value:"2022/03/21");

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:kubernetes:cri-o");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"Misc.");

  script_copyright(english:"This script is Copyright (C) 2022-2024 and is owned by Tenable, Inc. or an Affiliate thereof.");

  script_dependencies("ssh_get_info.nasl");
  script_require_keys("Host/local_checks_enabled");

  exit(0);
}

include('rpm.inc');
include('debian_package.inc');
include('ubuntu.inc');

if (!get_kb_item('Host/local_checks_enabled')) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);

function crio_check_deb(release)
{
  var flag = 0;
  if (deb_check(release:release, prefix:'cri-o', reference:'1.19.6~0', min:'1.19')) flag++;
  if (deb_check(release:release, prefix:'cri-o', reference:'1.20.7~0', min:'1.20')) flag++;
  if (deb_check(release:release, prefix:'cri-o', reference:'1.21.6~0', min:'1.21')) flag++;
  if (deb_check(release:release, prefix:'cri-o', reference:'1.22.3~0', min:'1.22')) flag++;
  if (deb_check(release:release, prefix:'cri-o', reference:'1.23.2~0', min:'1.23')) flag++;
  return flag;
}

# RPM based distros
var release;
var rpm_flag = 0;
if (rpm_exists(rpm:'cri-o-1.19.') && rpm_check(release:release, reference:'cri-o-1.19.5-3')) rpm_flag++;
if (rpm_exists(rpm:'cri-o-1.19.6') && rpm_check(release:release, reference:'cri-o-1.19.6-0')) rpm_flag++;
if (rpm_exists(rpm:'cri-o-1.20.') && rpm_check(release:release, reference:'cri-o-1.20.7-0')) rpm_flag++;
if (rpm_exists(rpm:'cri-o-1.21.') && rpm_check(release:release, reference:'cri-o-1.21.6-0')) rpm_flag++;
if (rpm_exists(rpm:'cri-o-1.22.') && rpm_check(release:release, reference:'cri-o-1.22.3-0')) rpm_flag++;
if (rpm_exists(rpm:'cri-o-1.23.') && rpm_check(release:release, reference:'cri-o-1.23.2-0')) rpm_flag++;

# Debian
var deb_flag = 0;
deb_flag += crio_check_deb(release:'9.0');
deb_flag += crio_check_deb(release:'10.0');
deb_flag += crio_check_deb(release:'11.0');

# Ubuntu Linux
var ubuntu_flag = 0;
ubuntu_flag += crio_check_deb(release:'14.04');
ubuntu_flag += crio_check_deb(release:'16.04');
ubuntu_flag += crio_check_deb(release:'18.04');
ubuntu_flag += crio_check_deb(release:'20.04');
ubuntu_flag += crio_check_deb(release:'21.04');

if (rpm_flag || deb_flag || ubuntu_flag)
{
  var extra;

  if (rpm_flag)
    extra = rpm_report_get();
  else if (deb_flag)
    extra = deb_report_get();
  else if (ubuntu_flag)
    extra = ubuntu_report_get();

  security_report_v4(
    port: 0,
    severity: SECURITY_HOLE,
    extra: extra
  );
  exit(0);
}
else
  audit(AUDIT_HOST_NOT, 'affected');

CVSS2

9

Attack Vector

NETWORK

Attack Complexity

LOW

Authentication

SINGLE

Confidentiality Impact

COMPLETE

Integrity Impact

COMPLETE

Availability Impact

COMPLETE

AV:N/AC:L/Au:S/C:C/I:C/A:C

CVSS3

8.8

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

LOW

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

AI Score

8.9

Confidence

High

EPSS

0.001

Percentile

46.8%