Apache Log4j 2.x < 2.16.0 RCE

critical Nessus Plugin ID 156057

Synopsis

A package installed on the remote host is affected by a remote code execution vulnerability.

Description

The version of Apache Log4j on the remote host is 2.x < 2.12.2 / 2.16.0. It is, therefore, affected by a remote code execution vulnerability. The fix to address CVE-2021-44228 in Apache Log4j 2.15.0 was incomplete in certain non-default configurations. This could allow attackers with control over Thread Context Map (MDC) input data when the logging configuration uses a non-default Pattern Layout with either a Context Lookup (for example, $${ctx:loginId}) or a Thread Context Map pattern (%X, %mdc, or %MDC) to craft malicious input data using a JNDI Lookup pattern resulting in a remote code execution (RCE) attack.

Note that Nessus has not tested for these issues but has instead relied only on the application's self-reported version number.

Solution

Upgrade to Apache Log4j version 2.3.1, 2.12.2, 2.16.0 or later, or apply the vendor mitigation.

Upgrading to the latest versions for Apache Log4j is highly recommended as intermediate versions / patches have known high severity vulnerabilities and the vendor is updating their advisories often as new research and knowledge about the impact of Log4j is discovered. Refer to https://logging.apache.org/log4j/2.x/security.html for the latest versions.

See Also

https://github.com/advisories/GHSA-7rjr-3q55-vv33

https://access.redhat.com/security/cve/cve-2021-45046

Plugin Details

Severity: Critical

ID: 156057

File Name: apache_log4j_2_16_0.nasl

Version: 1.15

Type: local

Agent: windows, macosx, unix

Family: Misc.

Published: 12/14/2021

Updated: 4/11/2022

Configuration: Enable thorough checks

Supported Sensors: Frictionless Assessment Agent, Frictionless Assessment AWS, Frictionless Assessment Azure, Nessus Agent

Risk Information

VPR

Risk Factor: Critical

Score: 9.9

CVSS v2

Risk Factor: Medium

Base Score: 5.1

Temporal Score: 3.8

Vector: AV:N/AC:H/Au:N/C:P/I:P/A:P

Temporal Vector: E:U/RL:OF/RC:C

CVSS Score Source: CVE-2021-45046

CVSS v3

Risk Factor: Critical

Base Score: 9

Temporal Score: 7.8

Vector: CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H

Temporal Vector: E:U/RL:O/RC:C

Vulnerability Information

CPE: cpe:/a:apache:log4j

Required KB Items: installed_sw/Apache Log4j

Exploit Ease: No known exploits are available

Patch Publication Date: 12/14/2021

Vulnerability Publication Date: 12/14/2021

Reference Information

CVE: CVE-2021-45046

IAVA: 2021-A-0573, 2021-A-0598, 2021-A-0597, 2021-A-0596, 0001-A-0650