{"id":"CVE-2022-24778","aliases":["CVE-2022-24778","GHSA-8v99-48m9-c8pm","GO-2021-0412"],"related":[],"kind":"vulnerability","state":"published","title":"Incorrect Authorization in imgcrypt","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"Imgcrypt implements a function `CheckAuthorization()` that is supposed to check whether a user is authorized to access an encrypted image given the keys that the user has provided on the command line that would enable decryption of the image. The check is to prevent that a user can start a container from an image that has previously been decrypted by another user on the same system and therefore a decrypted version of the image layers may be already available in the cache locally.\n\nThe 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. In the version prior to the fix, only the first architecture in the list was tested, which may not have its layers available locally (were not pulled) since it cannot 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 lead to other architectures in the ManifestList be able to run an image without providing keys if that image had previously been decrypted. The fixed version now skips over irrelevant architectures and tests the Manifest of the local architecture, if available.\n\nKnown projects that use the `CheckAuthorization()` of imgcrypt is for example the ctr-enc client tool provided by imgcrypt. In this implementation, the call to `CheckAuthorization()` is used on the client side and could therefore also be easily circumvented by a modified client tool not calling this function.\n\nIn relation to the vulnerability in ctr-enc, affected environments would have to allow different users to invoke ctr-enc indirectly using some sort of management stack that gives user indirect access to ctr-enc.\n\nThe patch has been applied to imgcrypt v1.1.4. Workarounds may include usage of different namespaces for each remote user.","format":"markdown","source":"ghsa"},{"lang":"en","text":"The imgcrypt library provides API extensions 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.","format":"markdown","source":"go"},{"lang":"es","text":"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","source":"nvd"}],"published":"2022-03-25T17:20:11.000Z","modified":"2026-06-17T04:32:30.040Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:N/A:N","score":5,"rating":"MEDIUM"}],"cwes":["CWE-863"],"affected":[{"ranges":[{"version":"< 1.1.4","status":"affected"}],"vendor":"containerd","product":"imgcrypt","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.1.4"}],"ecosystem":"Go","package":"github.com/containerd/imgcrypt","purl":"pkg:golang/github.com/containerd/imgcrypt","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.1.4"}],"ecosystem":"Go","package":"github.com/containerd/imgcrypt","purl":"pkg:golang/github.com/containerd/imgcrypt","source":"go"},{"ranges":[{"status":"affected","fixed":"1.1.4"}],"vendor":"linuxfoundation","product":"imgcrypt","cpe":"cpe:2.3:a:linuxfoundation:imgcrypt:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"34"},{"status":"affected","version":"35"},{"status":"affected","version":"36"}],"vendor":"fedoraproject","product":"fedora","cpe":"cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/containerd/imgcrypt/security/advisories/GHSA-8v99-48m9-c8pm","tags":["patch","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/containerd/imgcrypt/issues/69","tags":["exploit","issue-tracking","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/containerd/imgcrypt/commit/6fdd9818a4d8142107b7ecd767d839c9707700d9","tags":["fix","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/containerd/imgcrypt/releases/tag/v1.1.4","tags":["release-notes","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZFTJR5CR5EOYDVOSBZEMLBHLJRTPJPUA/","tags":["vendor-advisory","x-refsource-fedora","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TAHAAOOA3KZJC2I5WHCR3XVBJBNWTWUE/","tags":["vendor-advisory","x-refsource-fedora","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/4SJUNSC7YZLA745EMKWK2GKEV57GE52K/","tags":["vendor-advisory","x-refsource-fedora","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-24778","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/containerd/imgcrypt","tags":["package"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/4SJUNSC7YZLA745EMKWK2GKEV57GE52K","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TAHAAOOA3KZJC2I5WHCR3XVBJBNWTWUE","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZFTJR5CR5EOYDVOSBZEMLBHLJRTPJPUA","tags":["web"],"sources":["ghsa"]},{"url":"https://pkg.go.dev/vuln/GO-2021-0412","tags":["web"],"sources":["ghsa"]}],"credits":["@dimitar-dimitrow"],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2025-04-22T15:41:46.185Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-24778","url":"https://www.cve.org/CVERecord?id=CVE-2022-24778","licence":"CVE Terms of Use","modified":"2025-04-22T18:17:56.011Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-8v99-48m9-c8pm","url":"https://github.com/advisories/GHSA-8v99-48m9-c8pm","licence":"CC-BY-4.0","modified":"2024-05-20T20:48:13.000Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2021-0412","url":"https://pkg.go.dev/vuln/GO-2021-0412","licence":"CC-BY-4.0","modified":"2024-05-20T16:03:47.000Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-24778","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-24778","licence":"Public domain","modified":"2026-06-17T04:32:30.040Z"}],"updatedAt":"2026-11-25T22:58:10.264Z","epss":{"score":0.02718,"percentile":0.86429,"date":"2026-12-01T12:00:22.000Z"}}