{"id":"CVE-2024-39897","aliases":["CVE-2024-39897","GHSA-55r9-5mx9-qq7r","GO-2024-2979"],"related":["CGA-hqg8-7px4-ppfh"],"kind":"vulnerability","state":"published","title":"Cache driver GetBlob() allows read access to any blob without access control check","summary":"zot is an OCI image registry. Prior to 2.1.0, the cache driver `GetBlob()` allows read access to any blob without access control check. If a Zot `accessControl` policy allows users read access to some repositories but restricts read access to other repositories and `dedupe` is enabled (it is enabled by default), then an attacker who knows the name of an image and the digest of a blob (that they do not have read access to), they may maliciously read it via a second repository they do have read access to. \n This attack is possible because [`ImageStore.CheckBlob()` calls `checkCacheBlob()`](https://github.com/project-zot/zot/blob/v2.1.0-rc2/pkg/storage/imagestore/imagestore.go#L1158-L1159) to find the blob a global cache by searching for the digest. If it is found, it is copied to the user requested repository with `copyBlob()`. The attack may be mitigated by configuring \"dedupe\": false in the \"storage\" settings. The vulnerability is fixed in 2.1.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"zot is an OCI image registry. Prior to 2.1.0, the cache driver `GetBlob()` allows read access to any blob without access control check. If a Zot `accessControl` policy allows users read access to some repositories but restricts read access to other repositories and `dedupe` is enabled (it is enabled by default), then an attacker who knows the name of an image and the digest of a blob (that they do not have read access to), they may maliciously read it via a second repository they do have read access to. \n This attack is possible because [`ImageStore.CheckBlob()` calls `checkCacheBlob()`](https://github.com/project-zot/zot/blob/v2.1.0-rc2/pkg/storage/imagestore/imagestore.go#L1158-L1159) to find the blob a global cache by searching for the digest. If it is found, it is copied to the user requested repository with `copyBlob()`. The attack may be mitigated by configuring \"dedupe\": false in the \"storage\" settings. The vulnerability is fixed in 2.1.0.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nCache driver `GetBlob()` allows read access to any blob without access control check\n\n### Details\n\nIf a Zot `accessControl` policy allows users read access to some repositories but restricts read access to other repositories and `dedupe` is enabled (it is enabled by default), then an attacker who knows the name of an image and the digest of a blob (that they do not have read access to), they may maliciously read it via a second repository they do have read access to. This allows an attacker to read an image that the `accessControl` policy denies.\n\nThis attack is possible because [`ImageStore.CheckBlob()` calls `checkCacheBlob()`](https://github.com/project-zot/zot/blob/v2.1.0-rc2/pkg/storage/imagestore/imagestore.go#L1158-L1159) to find the blob a global cache by searching for the digest. If it is found, it is copied to the user requested repository with `copyBlob()`.\n\nThis cache behavior is intentionally used in [`RouteHandler.CreateBlobUpload()`](https://github.com/project-zot/zot/blob/v2.1.0-rc2/pkg/api/routes.go#L1194-L1197) to implement cross repository blob mount (`POST /v2/<name>/blobs/uploads/?mount=<digest>&from=<repository name>`) in Zot. This is still missing an access control to check read access on the source repository.\n\nThis cache behavior is unexpectedly also used in [`RouteHandler.CheckBlob()`](https://github.com/project-zot/zot/blob/v2.1.0-rc2/pkg/api/routes.go#L886) too for `HEAD /v2/<name>/blobs/<digest>`. If a blob is requested that does not exist on the requested repository, Zot will search for it in a global cache (possibly returning a result from an from an incorrect repository) and then will store it into the `ImageStore` for the requested repository.\n\n[`RouteHandler.GetBlob()`](https://github.com/project-zot/zot/blob/v2.1.0-rc2/pkg/api/routes.go#L1000) does _not_ call `ImageStore.CheckBlob()` so it is not directly vulnerable. However an attacker with only limited read access may first call `CheckBlob()` to fetch the blob from the cache, then call `GetBlob()` to read the blob.\n\n### Mitigation\n\nThe attack may be mitigated by configuring `\"dedupe\": false` in the `\"storage\"` settings. This disables Zot's cache drivers. `dedupe` is enabled by default using the BoltDB cache driver.\n\n### Impact\n\nAn attacker can read images that the `accessControl` policy denies if they have read access to any other second repository.\n\nThis attack only allows accessing blobs (both config and layers) by digest. Manifests cannot be accessed.\n\nThis attack requires the attacker to know the name of a private image and its layer digests. A scenario where this might happen is if a project has public CI build logs but publishes the image to a private repository. Many image build tools log layer digests.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Cache driver GetBlob() allows read access to any blob without access control check in zotregistry.dev/zot.\n\nNOTE: The source advisory for this report contains additional versions that could not be automatically mapped to standard Go module versions.\n\n(If this is causing false-positive reports from vulnerability scanners, please suggest an edit to the report.)\n\nThe additional affected modules and versions are: zotregistry.dev/zot before v2.1.0; zotregistry.io/zot before v2.1.0.","format":"markdown","source":"go"},{"lang":"es","text":"zot es un registro de imágenes OCI. Antes de 2.1.0, el controlador de caché `GetBlob()` permite acceso de lectura a cualquier blob sin verificación de control de acceso. Si una política `accessControl` de Zot permite a los usuarios acceso de lectura a algunos repositorios pero restringe el acceso de lectura a otros repositorios y `dedupe` está habilitado (está habilitado de forma predeterminada), entonces un atacante que conoce el nombre de una imagen y el resumen de una blob (al que no tienen acceso de lectura), pueden leerlo maliciosamente a través de un segundo repositorio al que sí tienen acceso de lectura. Este ataque es posible porque [`ImageStore.CheckBlob()` llama a `checkCacheBlob()`](https://github.com/project-zot/zot/blob/v2.1.0-rc2/pkg/storage/imagestore/imagestore .go#L1158-L1159) para encontrar el blob como caché global buscando el resumen. Si se encuentra, se copia al repositorio solicitado por el usuario con `copyBlob()`. El ataque se puede mitigar configurando \"dedupe\": false en la configuración de \"storage\". La vulnerabilidad se solucionó en 2.1.0.","source":"nvd"}],"published":"2024-07-09T18:48:24.335Z","modified":"2026-09-10T03:50:16.189Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","score":4.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","score":4.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","score":4.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","score":4.3,"rating":"MEDIUM"}],"cwes":["CWE-639"],"affected":[{"ranges":[{"version":"< 2.1.0","status":"affected"}],"vendor":"project-zot","product":"zot","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.1.0"}],"ecosystem":"Go","package":"zotregistry.io/zot","purl":"pkg:golang/zotregistry.io/zot","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.1.0"}],"ecosystem":"Go","package":"zotregistry.dev/zot","purl":"pkg:golang/zotregistry.dev/zot","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"zotregistry.dev/zot","purl":"pkg:golang/zotregistry.dev/zot","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"zotregistry.io/zot","purl":"pkg:golang/zotregistry.io/zot","source":"go"},{"ranges":[{"status":"affected","fixed":"2.1.0"}],"vendor":"zotregistry","product":"zot","cpe":"cpe:2.3:a:zotregistry:zot:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/project-zot/zot/security/advisories/GHSA-55r9-5mx9-qq7r","tags":["advisory","mitigation","vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/project-zot/zot/commit/aaee0220e46bdadd12115ac67c19f9d3153eb1df","tags":["patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-39897","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/project-zot/zot","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-07-10T20:35:45.771Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-39897","url":"https://www.cve.org/CVERecord?id=CVE-2024-39897","licence":"CVE Terms of Use","modified":"2024-08-02T04:33:11.364Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-55r9-5mx9-qq7r","url":"https://github.com/advisories/GHSA-55r9-5mx9-qq7r","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:16.189Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2024-2979","url":"https://pkg.go.dev/vuln/GO-2024-2979","licence":"CC-BY-4.0","modified":"2026-02-04T02:52:53.314Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-39897","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-39897","licence":"Public domain","modified":"2026-06-17T07:42:59.157Z"}],"updatedAt":"2026-11-25T22:58:42.695Z","epss":{"score":0.00298,"percentile":0.24188,"date":"2026-12-01T12:00:22.000Z"}}