Amazon Linux AMI : log4j (ALAS-2022-1562)

critical Nessus Plugin ID 156871

Synopsis

The remote Amazon Linux AMI host is missing a security update.

Description

The version of log4j installed on the remote host is prior to 1.2.17-16.12. It is, therefore, affected by multiple vulnerabilities as referenced in the ALAS-2022-1562 advisory.

- In Apache Log4j 2.x before 2.8.2, when using the TCP socket server or UDP socket server to receive serialized log events from another application, a specially crafted binary payload can be sent that, when deserialized, can execute arbitrary code. (CVE-2017-5645)

- Included in Log4j 1.2 is a SocketServer class that is vulnerable to deserialization of untrusted data which can be exploited to remotely execute arbitrary code when combined with a deserialization gadget when listening to untrusted network traffic for log data. This affects Log4j versions up to 1.2 up to 1.2.17.
(CVE-2019-17571)

- JMSAppender in Log4j 1.2 is vulnerable to deserialization of untrusted data when the attacker has write access to the Log4j configuration. The attacker can provide TopicBindingName and TopicConnectionFactoryBindingName configurations causing JMSAppender to perform JNDI requests that result in remote code execution in a similar fashion to CVE-2021-44228. Note this issue only affects Log4j 1.2 when specifically configured to use JMSAppender, which is not the default. Apache Log4j 1.2 reached end of life in August 2015. Users should upgrade to Log4j 2 as it addresses numerous other issues from the previous versions. (CVE-2021-4104)

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

Solution

Run 'yum update log4j' to update your system.

See Also

https://alas.aws.amazon.com/ALAS-2022-1562.html

https://alas.aws.amazon.com/cve/html/CVE-2017-5645.html

https://alas.aws.amazon.com/cve/html/CVE-2019-17571.html

https://alas.aws.amazon.com/cve/html/CVE-2021-4104.html

Plugin Details

Severity: Critical

ID: 156871

File Name: ala_ALAS-2022-1562.nasl

Version: 1.3

Type: local

Agent: unix

Published: 1/20/2022

Updated: 5/18/2022

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

Risk Information

CVSS Score Source: CVE-2019-17571

VPR

Risk Factor: High

Score: 8.4

CVSS v2

Risk Factor: High

Base Score: 7.5

Temporal Score: 5.5

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

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

CVSS v3

Risk Factor: Critical

Base Score: 9.8

Temporal Score: 8.5

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

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

Vulnerability Information

CPE: p-cpe:/a:amazon:linux:log4j, p-cpe:/a:amazon:linux:log4j-javadoc, p-cpe:/a:amazon:linux:log4j-manual, cpe:/o:amazon:linux

Required KB Items: Host/local_checks_enabled, Host/AmazonLinux/release, Host/AmazonLinux/rpm-list

Exploit Ease: No known exploits are available

Patch Publication Date: 1/18/2022

Vulnerability Publication Date: 4/17/2017

Reference Information

CVE: CVE-2017-5645, CVE-2019-17571, CVE-2021-4104

IAVA: 0001-A-0650, 2020-A-0140, 2020-A-0326, 2020-A-0324, 2019-A-0021-S, 2019-A-0025-S, 2019-A-0256-S, 2018-A-0117-S, 2019-A-0128, 2018-A-0030-S, 2018-A-0118-S, 2018-A-0226-S, 2018-A-0225-S, 2018-A-0229-S, 2018-A-0336-S, 2018-A-0335-S, 2020-A-0008-S, 2021-A-0573

ALAS: 2022-1562