Amazon Linux 2 : java-17-amazon-corretto, java-11-amazon-corretto, java-1.8.0-openjdk, java-1.7.0-openjdk (ALAS-2021-1731)

critical Nessus Plugin ID 156182

Synopsis

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

Description

The version of java-1.7.0-openjdk installed on the remote host is prior to 1.7.0.261-2.6.22.2. The version of java-1.8.0-openjdk installed on the remote host is prior to 1.8.0.312.b07-1. The version of java-11-amazon-corretto installed on the remote host is prior to 11.0.13+8-2. The version of java-17-amazon-corretto installed on the remote host is prior to 17.0.1+12-3. It is, therefore, affected by multiple vulnerabilities as referenced in the ALAS2-2021-1731 advisory.

- Apache Log4j2 2.0-beta9 through 2.12.1 and 2.13.0 through 2.15.0 JNDI features used in configuration, log messages, and parameters do not protect against attacker controlled LDAP and other JNDI related endpoints.
An attacker who can control log messages or log message parameters can execute arbitrary code loaded from LDAP servers when message lookup substitution is enabled. From log4j 2.15.0, this behavior has been disabled by default. From version 2.16.0, this functionality has been completely removed. Note that this vulnerability is specific to log4j-core and does not affect log4net, log4cxx, or other Apache Logging Services projects. (CVE-2021-44228)

- It was found that the fix to address CVE-2021-44228 in Apache Log4j 2.15.0 was incomplete in certain non- default configurations. This could allows 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 denial of service (DOS) attack. Log4j 2.15.0 makes a best- effort attempt to restrict JNDI LDAP lookups to localhost by default. Log4j 2.16.0 fixes this issue by removing support for message lookup patterns and disabling JNDI functionality by default. (CVE-2021-45046)

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 java-17-amazon-corretto' to update your system.
Run 'yum update java-11-amazon-corretto' to update your system.
Run 'yum update java-1.8.0-openjdk' to update your system.
Run 'yum update java-1.7.0-openjdk' to update your system.

See Also

https://alas.aws.amazon.com/AL2/ALAS-2021-1731.html

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

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

Plugin Details

Severity: Critical

ID: 156182

File Name: al2_ALAS-2021-1731.nasl

Version: 1.4

Type: local

Agent: unix

Published: 12/18/2021

Updated: 12/30/2021

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

Risk Information

CVSS Score Source: CVE-2021-44228

VPR

Risk Factor: Critical

Score: 10

CVSS v2

Risk Factor: High

Base Score: 9.3

Temporal Score: 8.1

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

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

CVSS v3

Risk Factor: Critical

Base Score: 10

Temporal Score: 9.5

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

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

Vulnerability Information

CPE: p-cpe:/a:amazon:linux:java-1.7.0-openjdk, p-cpe:/a:amazon:linux:java-1.7.0-openjdk-accessibility, p-cpe:/a:amazon:linux:java-1.7.0-openjdk-debuginfo, p-cpe:/a:amazon:linux:java-1.7.0-openjdk-demo, p-cpe:/a:amazon:linux:java-1.7.0-openjdk-devel, p-cpe:/a:amazon:linux:java-1.7.0-openjdk-headless, p-cpe:/a:amazon:linux:java-1.7.0-openjdk-javadoc, p-cpe:/a:amazon:linux:java-1.7.0-openjdk-src, p-cpe:/a:amazon:linux:java-1.8.0-openjdk, p-cpe:/a:amazon:linux:java-1.8.0-openjdk-accessibility, p-cpe:/a:amazon:linux:java-1.8.0-openjdk-accessibility-debug, p-cpe:/a:amazon:linux:java-1.8.0-openjdk-debug, p-cpe:/a:amazon:linux:java-1.8.0-openjdk-debuginfo, p-cpe:/a:amazon:linux:java-1.8.0-openjdk-demo, p-cpe:/a:amazon:linux:java-1.8.0-openjdk-demo-debug, p-cpe:/a:amazon:linux:java-1.8.0-openjdk-devel, p-cpe:/a:amazon:linux:java-1.8.0-openjdk-devel-debug, p-cpe:/a:amazon:linux:java-1.8.0-openjdk-headless, p-cpe:/a:amazon:linux:java-1.8.0-openjdk-headless-debug, p-cpe:/a:amazon:linux:java-1.8.0-openjdk-javadoc, p-cpe:/a:amazon:linux:java-1.8.0-openjdk-javadoc-debug, p-cpe:/a:amazon:linux:java-1.8.0-openjdk-javadoc-zip, p-cpe:/a:amazon:linux:java-1.8.0-openjdk-javadoc-zip-debug, p-cpe:/a:amazon:linux:java-1.8.0-openjdk-src, p-cpe:/a:amazon:linux:java-1.8.0-openjdk-src-debug, p-cpe:/a:amazon:linux:java-11-amazon-corretto, p-cpe:/a:amazon:linux:java-11-amazon-corretto-headless, p-cpe:/a:amazon:linux:java-11-amazon-corretto-javadoc, p-cpe:/a:amazon:linux:java-17-amazon-corretto, p-cpe:/a:amazon:linux:java-17-amazon-corretto-devel, p-cpe:/a:amazon:linux:java-17-amazon-corretto-headless, p-cpe:/a:amazon:linux:java-17-amazon-corretto-javadoc, p-cpe:/a:amazon:linux:java-17-amazon-corretto-jmods, cpe:/o:amazon:linux:2

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

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 12/17/2021

Vulnerability Publication Date: 12/10/2021

CISA Known Exploited Dates: 12/24/2021

Reference Information

CVE: CVE-2021-44228, CVE-2021-45046

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

ALAS: 2021-1731