Apache Log4Shell CVE-2021-45046 Bypass Remote Code Execution

critical Nessus Plugin ID 156164

Synopsis

The version of Apache Log4j used on the remote server is affected by a remote code execution vulnerability.

Description

A remote code execution vulnerability exists in Apache Log4j < 2.16.0 due to insufficient protections on message lookup substitutions when dealing with user controlled input. A remote, unauthenticated attacker can explolit this, via a web request to execute arbitrary code with the permission level of the running Java process.

Note that this bypass requires a non-default configuration. Only Pattern Layouts with a Context Lookup (for example, $${ctx:loginId}) are vulnerable to this.

This plugin requires that both the scanner and target machine have internet access.

Solution

Upgrade to Apache Log4j version 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://logging.apache.org/log4j/2.x/security.html

https://www.lunasec.io/docs/blog/log4j-zero-day/

http://www.nessus.org/u?a0e621e5

Plugin Details

Severity: Critical

ID: 156164

File Name: apache_log4shell_CVE-2021-45056_direct_check.nbin

Version: 1.34

Type: remote

Family: Web Servers

Published: 12/17/2021

Updated: 7/17/2024

Supported Sensors: Nessus

Risk Information

CVSS Score Rationale: Nvd has not updated their score yet

VPR

Risk Factor: High

Score: 8.1

CVSS v2

Risk Factor: High

Base Score: 9.3

Vector: CVSS2#AV:N/AC:M/Au:N/C:C/I:C/A:C

CVSS Score Source: manual

CVSS v3

Risk Factor: Critical

Base Score: 9

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

Vulnerability Information

CPE: cpe:/a:apache:log4j

Patch Publication Date: 12/10/2021

Vulnerability Publication Date: 12/9/2021

CISA Known Exploited Vulnerability Due Dates: 5/22/2023

Reference Information

CVE: CVE-2021-45046

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