CVE Vulnerabilities

CVE-2021-44228

Deserialization of Untrusted Data

Published: Dec 10, 2021
Modified: Jan 20, 2022
CVSS 3.x
10
CRITICAL
Source:
NVD
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
CVSS 2.x
9.3 HIGH
AV:N/AC:M/Au:N/C:C/I:C/A:C
RedHat/V2
RedHat/V3
9.8 CRITICAL
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Ubuntu

Apache Log4j2 2.0-beta9 through 2.15.0 (excluding security releases 2.12.2, 2.12.3, and 2.3.1) 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 (along with 2.12.2, 2.12.3, and 2.3.1), 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.

Weakness

The application deserializes untrusted data without sufficiently verifying that the resulting data will be valid.

Affected Software

NameVendorStart VersionEnd Version
Log4jApache2.02.0
Log4jApache2.02.0
Log4jApache2.02.0
Log4jApache2.02.0
Log4jApache2.0.1*
Log4jApache2.13.0*
OpenShift Logging 5.0RedHatopenshift-logging/elasticsearch6-rhel8:v5.0.10-1*
OpenShift Logging 5.1RedHatopenshift-logging/elasticsearch6-rhel8:v6.8.1-67*
OpenShift Logging 5.2RedHatopenshift-logging/elasticsearch6-rhel8:v6.8.1-66*
OpenShift Logging 5.3RedHatopenshift-logging/elasticsearch6-rhel8:v6.8.1-65*
Red Hat AMQ Streams 1RedHat*
Red Hat AMQ Streams 1RedHatlog4j-core*
Red Hat Data Grid 8RedHatlog4j-core*
Red Hat IntegrationRedHatlog4j-core*
Red Hat IntegrationRedHatlog4j-core*
Red Hat JBoss Enterprise Application Platform 7RedHatlog4j-core*
Red Hat JBoss Fuse 7RedHatlog4j-core*
Red Hat JBoss Fuse 7RedHatlog4j-core*
Red Hat OpenShift Application Runtimes 1.0RedHatlog4j-core*
Red Hat OpenShift Container Platform 3.11RedHatopenshift3/ose-logging-elasticsearch5:v3.11.570-2.gd119820*
Red Hat OpenShift Container Platform 4.6RedHatopenshift4/ose-logging-elasticsearch6:v4.6.0-202112132021.p0.g2a13a81.assembly.stream*
Red Hat OpenShift Container Platform 4.6RedHatopenshift4/ose-metering-hive:v4.6.0-202112140546.p0.g8b9da97.assembly.stream*
Red Hat OpenShift Container Platform 4.6RedHatopenshift4/ose-metering-presto:v4.6.0-202112150545.p0.g190688a.assembly.art3595*
Red Hat OpenShift Container Platform 4.7RedHatopenshift4/ose-metering-hive:v4.7.0-202112140553.p0.g091bb99.assembly.stream*
Red Hat OpenShift Container Platform 4.7RedHatopenshift4/ose-metering-presto:v4.7.0-202112150631.p0.gd502108.assembly.4.7.40*
Red Hat OpenShift Container Platform 4.8RedHatopenshift4/ose-metering-hive:v4.8.0-202112132154.p0.g57dd03a.assembly.stream*
Red Hat OpenShift Container Platform 4.8RedHatopenshift4/ose-metering-presto:v4.8.0-202112150431.p0.g4b934ae.assembly.art3599*
Red Hat Process Automation 7RedHat*
Apache-log4j2Ubuntubionic*
Apache-log4j2Ubuntuesm-infra/xenial*
Apache-log4j2Ubuntufocal*
Apache-log4j2Ubuntuhirsute*
Apache-log4j2Ubuntuimpish*
Apache-log4j2Ubuntutrusty*
Apache-log4j2Ubuntuupstream*
Apache-log4j2Ubuntuxenial*

Extended Description

It is often convenient to serialize objects for communication or to save them for later use. However, deserialized data or code can often be modified without using the provided accessor functions if it does not use cryptography to protect itself. Furthermore, any cryptography would still be client-side security – which is a dangerous security assumption. Data that is untrusted can not be trusted to be well-formed. When developers place no restrictions on “gadget chains,” or series of instances and method invocations that can self-execute during the deserialization process (i.e., before the object is returned to the caller), it is sometimes possible for attackers to leverage them to perform unauthorized actions, like generating a shell.

Potential Mitigations

  • Make fields transient to protect them from deserialization.
  • An attempt to serialize and then deserialize a class containing transient fields will result in NULLs where the transient data should be. This is an excellent way to prevent time, environment-based, or sensitive variables from being carried over and used improperly.

References

/center/content/CiscoSecurityAdvisory/cisco-sa-apache-log4j-qRuKNEbd