CVE Vulnerabilities

CVE-2022-45047

Deserialization of Untrusted Data

Published: Nov 16, 2022 | Modified: Feb 16, 2024
CVSS 3.x
9.8
CRITICAL
Source:
NVD
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 2.x
RedHat/V2
RedHat/V3
9.8 IMPORTANT
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Ubuntu

Class org.apache.sshd.server.keyprovider.SimpleGeneratorHostKeyProvider in Apache MINA SSHD <= 2.9.1 uses Java deserialization to load a serialized java.security.PrivateKey. The class is one of several implementations that an implementor using Apache MINA SSHD can choose for loading the host keys of an SSH server.

Weakness

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

Affected Software

Name Vendor Start Version End Version
Sshd Apache * 2.9.1 (including)
OCP-Tools-4.12-RHEL-8 RedHat jenkins-2-plugins-0:4.12.1675702407-1.el8 *
OpenShift Developer Tools and Services for OCP 4.11 RedHat jenkins-2-plugins-0:4.11.1683009941-1.el8 *
Red Hat build of Quarkus RedHat *
Red Hat build of Quarkus Platform 2.7.6.SP3 RedHat sshd-common *
Red Hat Data Grid 8.4.1 RedHat mina-sshd *
Red Hat Data Grid 8.4.4 RedHat *
Red Hat JBoss Enterprise Application Platform 7 RedHat sshd-common *
Red Hat JBoss Enterprise Application Platform 7.4 for RHEL 8 RedHat eap7-apache-sshd-0:2.9.2-1.redhat_00001.1.el8eap *
Red Hat JBoss Enterprise Application Platform 7.4 for RHEL 9 RedHat eap7-apache-sshd-0:2.9.2-1.redhat_00001.1.el9eap *
Red Hat JBoss Enterprise Application Platform 7.4 on RHEL 7 RedHat eap7-apache-sshd-0:2.9.2-1.redhat_00001.1.el7eap *
Red Hat OpenShift Container Platform 4.10 RedHat jenkins-2-plugins-0:4.10.1675144701-1.el8 *
Red Hat OpenShift Container Platform 4.9 RedHat jenkins-2-plugins-0:4.9.1675668922-1.el8 *
Red Hat Single Sign-On 7 RedHat sshd-common *
Red Hat Single Sign-On 7.6 for RHEL 7 RedHat rh-sso7-keycloak-0:18.0.6-1.redhat_00001.1.el7sso *
Red Hat Single Sign-On 7.6 for RHEL 8 RedHat rh-sso7-keycloak-0:18.0.6-1.redhat_00001.1.el8sso *
Red Hat Single Sign-On 7.6 for RHEL 9 RedHat rh-sso7-keycloak-0:18.0.6-1.redhat_00001.1.el9sso *
Red Hat Virtualization 4 for Red Hat Enterprise Linux 8 RedHat vdsm-0:4.50.3.6-1.el8ev *
Red Hat Virtualization Engine 4.4 RedHat apache-sshd-1:2.9.2-0.1.el8ev *
RHEL-8 based Middleware Containers RedHat rh-sso-7/sso76-openshift-rhel8:7.6-20 *
RHINT Camel-Springboot 3.18.3.P2 RedHat *
RHPAM 7.13.4 async RedHat mina-sshd *

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