// For flags

CVE-2022-24778

Incorrect Authorization in imgcrypt

Severity Score

7.5
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

1
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

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.

La biblioteca imgcrypt proporciona extensiones de la API para que containerd admita imágenes de contenedor cifradas e implementa la herramienta de línea de comandos ctd-decoder para que containerd la use para descifrar imágenes de contenedor cifradas. La función imgcrypt "CheckAuthorization" es supuesto que comprueba si el usuario actual está autorizado a acceder a una imagen encriptada y evita que el usuario ejecute una imagen que otro usuario haya desencriptado previamente en el mismo sistema. En versiones anteriores a 1.1.4, es producido un fallo cuando es usada una imagen con una ManifestList y la arquitectura del host local no es la primera de la ManifestList. Sólo es comprobada la primera arquitectura de la lista, que podía no presentar sus capas disponibles localmente al no poder ejecutarse en la arquitectura del host. Por lo tanto, el veredicto sobre las capas no disponibles fue que la imagen podía ser ejecutada anticipando que el fallo de ejecución de la imagen ocurriría más tarde debido a que las capas no estaban disponibles. Sin embargo, este veredicto de permitir la ejecución de la imagen permitía a otras arquitecturas de la ManifestList ejecutar una imagen sin proporcionar claves si esa imagen había sido descifrada previamente. Ha sido aplicado un parche a imgcrypt versión 1.1.4. Las mitigaciones pueden incluir el uso de diferentes espacios de nombres para cada usuario remoto

A flaw was found in the imgcrypt library when checking the keys of an authorized user to access an encrypted image on systems where layers are not available and cannot run on the host architecture. This flaw allows an attacker to run an image without providing the previously decrypted keys.

*Credits: N/A
CVSS Scores
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None
Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None
Attack Vector
Network
Attack Complexity
Low
Authentication
None
Confidentiality
Partial
Integrity
None
Availability
None
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2022-02-10 CVE Reserved
  • 2022-03-25 CVE Published
  • 2024-08-03 CVE Updated
  • 2024-08-03 First Exploit
  • 2024-10-29 EPSS Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
CWE
  • CWE-303: Incorrect Implementation of Authentication Algorithm
  • CWE-863: Incorrect Authorization
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Linuxfoundation
Search vendor "Linuxfoundation"
Imgcrypt
Search vendor "Linuxfoundation" for product "Imgcrypt"
< 1.1.4
Search vendor "Linuxfoundation" for product "Imgcrypt" and version " < 1.1.4"
-
Affected
Fedoraproject
Search vendor "Fedoraproject"
Fedora
Search vendor "Fedoraproject" for product "Fedora"
34
Search vendor "Fedoraproject" for product "Fedora" and version "34"
-
Affected
Fedoraproject
Search vendor "Fedoraproject"
Fedora
Search vendor "Fedoraproject" for product "Fedora"
35
Search vendor "Fedoraproject" for product "Fedora" and version "35"
-
Affected
Fedoraproject
Search vendor "Fedoraproject"
Fedora
Search vendor "Fedoraproject" for product "Fedora"
36
Search vendor "Fedoraproject" for product "Fedora" and version "36"
-
Affected