CVE-2024-39897 Cache driver GetBlob() allows read access to any blob without access control check
Attackers can read restricted blobs from other repositories via the cache driver if deduplication is enabled, bypassing access controls.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-39897?
CVE-2024-39897 is a medium-severity missing authorization vulnerability in project-zot zot, published on 9 Jul 2024. Any signed-in user can exploit it over the network, with no action from the victim.
Official 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.
Weakness: CWE-639
Which versions are affected by CVE-2024-39897?
6 open source packages ship an affected version, including zotregistry.dev/zot and zotregistry.io/zot. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
zotregistry.dev/zot Go | All versions | None |
zotregistry.dev/zot Go | All versions | 2.1.0 |
zotregistry.dev/zot Go | All versions | 2.1.0 |
zotregistry.io/zot Go | All versions | None |
zotregistry.io/zot Go | All versions | 2.1.0 |
zotregistry.io/zot Go | All versions | 2.1.0 |
Products include Zotregistry Zot.
How do I fix CVE-2024-39897?
Upgrade zotregistry.dev/zot to 2.1.0 or later.
Upgrade, and check permissions on every request on the server, not only in the interface. More about Missing authorization.
Is CVE-2024-39897 being exploited?
There is no known exploitation of CVE-2024-39897 in the wild and no public exploit code.
Other vulnerabilities in project-zot zot
Sources
Also known as GHSA-55r9-5mx9-qq7r, GO-2024-2979.