CVE Vulnerabilities

CVE-2022-24778

Incorrect Authorization

Published: Mar 25, 2022 | Modified: Nov 21, 2024
CVSS 3.x
7.5
HIGH
Source:
NVD
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
CVSS 2.x
5 MEDIUM
AV:N/AC:L/Au:N/C:P/I:N/A:N
RedHat/V2
RedHat/V3
7.4 IMPORTANT
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
Ubuntu
MEDIUM
root.io logo minimus.io logo echo.ai logo

The imgcrypt library provides API exensions for containerd to support encrypted container images and implements the ctd-decoder command line tool for use by containerd to decrypt encrypted container images. The imgcrypt function CheckAuthorization is supposed to check whether the current used is authorized to access an encrypted image and prevent the user from running an image that another user previously decrypted on the same system. In versions prior to 1.1.4, a failure occurs when an image with a ManifestList is used and the architecture of the local host is not the first one in the ManifestList. Only the first architecture in the list was tested, which may not have its layers available locally since it could not be run on the host architecture. Therefore, the verdict on unavailable layers was that the image could be run anticipating that image run failure would occur later due to the layers not being available. However, this verdict to allow the image to run enabled other architectures in the ManifestList to run an image without providing keys if that image had previously been decrypted. A patch has been applied to imgcrypt 1.1.4. Workarounds may include usage of different namespaces for each remote user.

Weakness

The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.

Affected Software

NameVendorStart VersionEnd Version
ImgcryptLinuxfoundation*1.1.4 (excluding)
Red Hat OpenShift Container Platform 4.11RedHatopenshift4/kubernetes-nmstate-rhel8-operator:v4.11.0-202208020235.p0.ga6744d1.assembly.stream*
RHACS-3.73-RHEL-8RedHatadvanced-cluster-security/rhacs-main-rhel8:3.73.0-4*
ContainerdUbuntubionic*
ContainerdUbuntuesm-apps/bionic*
ContainerdUbuntuesm-apps/xenial*
ContainerdUbuntuesm-infra/focal*
ContainerdUbuntufocal*
ContainerdUbuntuimpish*
ContainerdUbuntujammy*
ContainerdUbuntutrusty*
ContainerdUbuntuupstream*
ContainerdUbuntuxenial*

Potential Mitigations

  • Divide the product into anonymous, normal, privileged, and administrative areas. Reduce the attack surface by carefully mapping roles with data and functionality. Use role-based access control (RBAC) [REF-229] to enforce the roles at the appropriate boundaries.
  • Note that this approach may not protect against horizontal authorization, i.e., it will not protect a user from attacking others with the same role.
  • Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.
  • For example, consider using authorization frameworks such as the JAAS Authorization Framework [REF-233] and the OWASP ESAPI Access Control feature [REF-45].
  • For web applications, make sure that the access control mechanism is enforced correctly at the server side on every page. Users should not be able to access any unauthorized functionality or information by simply requesting direct access to that page.
  • One way to do this is to ensure that all pages containing sensitive information are not cached, and that all such pages restrict access to requests that are accompanied by an active and authenticated session token associated with a user who has the required permissions to access that page.

References