CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2024-39897

CVE-2024-39897: Authorization Bypass in Zot Registry via Blob Mounting

Amit Schendel
Amit Schendel
Senior Security Researcher

Mar 1, 2026·5 min read·28 visits

Executive Summary (TL;DR)

CVE-2024-39897 allows authenticated attackers to read private container layers by abusing the OCI 'mount' API. Zot's deduplication logic failed to verify source permissions, allowing cross-repository mounting of blobs via their digest. Fixed in version 2.1.0.

Zot, an OCI-compliant container image registry, contains an authorization bypass vulnerability in its storage deduplication logic. The issue allows authenticated users to mount (copy) blobs from repositories they do not have permission to access, provided they know the SHA256 digest of the target blob. This effectively grants unauthorized read access to private container layers.

Vulnerability Overview

CVE-2024-39897 is a logical access control flaw within the Zot container registry, specifically affecting the implementation of the OCI distribution specification's cross-repository blob mounting feature. In standard OCI operations, a client pushing an image can request to 'mount' a layer (blob) from another repository to avoid re-uploading duplicate data. This optimization relies on the registry verifying that the client has read access to the source repository before allowing the mount.

In affected versions of Zot (prior to 2.1.0), this access check was missing or insufficient. The system performed a global lookup for the requested blob digest in its deduplication cache. If the blob existed anywhere in the storage backend, Zot permitted the mount operation into the attacker's repository. This vulnerability is classified as an Authorization Bypass Through User-Controlled Key (CWE-639), as the blob digest serves as the key to access data without proper authorization context.

Root Cause Analysis

The root cause lies in the dissociation between storage deduplication logic and access control enforcement in pkg/api/routes.go. Zot utilizes a global cache (often backed by BoltDB or DynamoDB) to track blobs across all repositories to save space. When a POST request is made to /v2/<repo>/blobs/uploads/?mount=<digest>, the handler invokes imgStore.CheckBlob(name, digest).

In the vulnerable code path, CheckBlob verified the existence of the digest in the global cache. Upon a cache hit, the system assumed the blob was available for mounting and proceeded to link it to the destination repository. The critical failure was the absence of an intervening check to validate the user's permissions against the source repository (or any repository strictly associated with that blob). The system implicitly trusted that knowledge of the digest equated to authorization to access the content, violating the principle of least privilege.

Code Analysis

The vulnerability manifests in the handling of the mount query parameter during blob uploads. Below is a conceptual reconstruction of the flaw based on the patch analysis.

Vulnerable Logic (Simplified): In the CreateBlobUpload handler, the code checks if the blob exists globally:

// BEFORE FIX: Global lookup without permission check
if mountDigest != "" {
    // Checks global storage for digest existence
    exists, err := imgStore.CheckBlob(mountDigest)
    if err == nil && exists {
        // Vulnerability: Directly mounts the blob to the user's repo
        // No verification that user has Read access to the origin of the blob
        err = imgStore.MountBlob(destinationRepo, mountDigest)
        return 201, "Created"
    }
}

Patched Logic: The fix introduces a mandatory authorization step. The system must now identify a repository where the user does have read access that also contains the requested blob. If no such repository is found, the mount is denied, forcing the user to upload the data themselves.

// AFTER FIX: explicit permission validation
if mountDigest != "" {
    // 1. Verify existence
    exists, _ := imgStore.CheckBlob(mountDigest)
    
    // 2. NEW: Verify authorization via helper
    // 'canMount' checks if the user has READ access to at least
    // one repository that actually holds this blob.
    if exists && c.canMount(user, mountDigest) {
         imgStore.MountBlob(destinationRepo, mountDigest)
         return 201, "Created"
    }
    
    // If check fails, fall back to standard upload (202 Accepted)
    return 202, "Accepted"
}

Exploitation Mechanics

Exploitation requires an authenticated account and knowledge of a target blob's SHA256 digest. The attacker does not need to guess the digest; they might obtain it from leaked manifests, public metadata, or side-channel information.

Attack Scenario:

  1. Target Identification: The attacker targets a private image secret-project/app:latest and obtains the digest of a configuration layer (sha256:deadbeef...).
  2. Request Construction: The attacker sends a request to their own repository attacker/repo requesting to mount the target digest.
    POST /v2/attacker/repo/blobs/uploads/?mount=sha256:deadbeef...&from=secret-project/app HTTP/1.1
    Host: zot-registry.local
    Authorization: Bearer <Attacker_Token>
  3. Bypass Execution: The vulnerable Zot instance sees sha256:deadbeef... in its global storage. Ignoring the ACLs on secret-project/app, it links the blob to attacker/repo.
  4. Data Exfiltration: The attacker now issues a standard GET /v2/attacker/repo/blobs/sha256:deadbeef... request to download the layer content.

Impact Assessment

The primary impact is Confidentiality Loss. The vulnerability allows the leakage of proprietary code, configuration files, binary artifacts, and potential secrets (API keys, certificates) embedded within container layers.

Risk Factors:

  • Scope: The attack is limited to reading data. Integrity and Availability are unaffected (an attacker cannot overwrite or delete blobs).
  • Prerequisites: Low complexity (AC:L), but requires Low Privileges (PR:L) and knowledge of the digest.
  • CVSS Context: The score is Medium (4.3) because it strictly affects Confidentiality and requires existing access to the registry. However, in multi-tenant environments where strict isolation between teams is required, the severity effectively increases due to the breakdown of tenant boundaries.

Remediation and Mitigation

The vulnerability is addressed in Zot version 2.1.0. Administrators should upgrade immediately to ensure canMount checks are enforced.

Immediate Mitigation (Configuration): If an upgrade is not feasible, administrators can disable storage deduplication. This prevents the code path that performs the insecure global lookup, though it will increase storage consumption.

{
  "storage": {
    "dedupe": false
  }
}

Verification: After patching, verify the fix using the TestAuthorizationMountBlob logic: attempt to mount a blob from a repository the test user cannot access. The server should respond with 202 Accepted (indicating the mount failed and a fresh upload is expected) rather than 201 Created.

Official Patches

project-zotZot v2.1.0 Release Notes
project-zotPatch Commit

Fix Analysis (1)

Technical Appendix

CVSS Score
4.3/ 10
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
EPSS Probability
0.36%
Top 42% most exploited

Affected Systems

Zot OCI Registry < 2.1.0

Affected Versions Detail

Product
Affected Versions
Fixed Version
zot
project-zot
< 2.1.02.1.0
AttributeDetail
CWE IDCWE-639
Attack VectorNetwork
CVSS Score4.3 (Medium)
EPSS Score0.36%
ImpactConfidentiality Loss
Exploit StatusPoC Available

MITRE ATT&CK Mapping

T1213Data from Information Repositories
Collection
T1596Search Open Technical Databases
Reconnaissance
CWE-639
Authorization Bypass Through User-Controlled Key

Vulnerability Timeline

Patch committed
2024-07-08
GHSA Advisory Published
2024-07-09
CVE Assigned
2024-07-09

References & Sources

  • [1]GitHub Security Advisory GHSA-55r9-5mx9-qq7r
  • [2]NVD Entry for CVE-2024-39897

More Reports

•about 1 hour ago•CVE-2026-48861
2.1

CVE-2026-48861: HTTP Request Splitting and Smuggling via Method Parameter CRLF Injection in Elixir Mint

CVE-2026-48861 is a client-side HTTP request-line CRLF (Carriage Return Line Feed) injection vulnerability in the popular Elixir HTTP client library, Mint. The vulnerability permits HTTP Request Splitting and HTTP Request Smuggling when an application forwards untrusted, attacker-controlled inputs to Mint's HTTP client requests as either the HTTP request method or target. By embedding CRLF characters within these parameters, an attacker can terminate the request line prematurely, inject malicious headers, or pipeline entirely independent requests. These smuggled requests are then processed by upstream or downstream proxy servers as separate HTTP queries on the same TCP connection. While Mint version 1.7.0 introduced target validation to secure the request target, the HTTP request method parameter remained completely unvalidated. This flaw allows attackers to bypass routing filters, access restricted internal APIs, or poison HTTP caches under default configurations.

Amit Schendel
Amit Schendel
3 views•7 min read
•about 2 hours ago•CVE-2026-49753
6.3

CVE-2026-49753: HTTP Request/Response Smuggling via Inconsistent Content-Length Parsing in Elixir Mint Client

An Inconsistent Interpretation of HTTP Requests (HTTP Request/Response Smuggling) vulnerability in the Elixir Mint HTTP client allows attacker-controlled HTTP/1 servers to desynchronize response framing on shared connections due to over-lenient parsing of sign-prefixed Content-Length headers.

Amit Schendel
Amit Schendel
5 views•6 min read
•about 2 hours ago•CVE-2026-49754
8.2

CVE-2026-49754: Denial of Service via Unbounded HTTP/2 CONTINUATION Frame Accumulation in Elixir Mint

An allocation of resources without limits or throttling vulnerability in Elixir Mint allows an attacker-controlled HTTP/2 server to exhaust memory in a Mint client. The vulnerability is exploited by sending a HEADERS frame without the END_HEADERS flag followed by an infinite stream of CONTINUATION frames. Because the client lacks limits on the incoming header-block accumulator, the client continuously consumes memory until an out-of-memory crash occurs.

Amit Schendel
Amit Schendel
6 views•6 min read
•about 3 hours ago•CVE-2026-48596
2.1

CVE-2026-48596: Improper Neutralization of CRLF Sequences in Elixir Tesla Multipart HTTP Client

CVE-2026-48596 is an Improper Neutralization of CRLF Sequences in HTTP Headers (HTTP Request/Response Splitting, CWE-113) in the Elixir Tesla HTTP client. The flaw resides in how multipart content-type parameters are joined and serialized, enabling attackers to inject arbitrary headers or split HTTP requests when applications pass untrusted inputs to the parameters of multipart uploads.

Alon Barad
Alon Barad
4 views•6 min read
•about 3 hours ago•CVE-2026-48594
8.2

CVE-2026-48594: Decompression Bomb Denial of Service in Elixir Tesla HTTP Client

An improper handling of highly compressed data (decompression bomb) vulnerability exists in the Elixir Tesla HTTP client when utilizing response decompression middlewares. By serving highly compressed responses or stacked content-encoding headers, a malicious server can cause arbitrary heap exhaustion, leading to a denial of service (DoS) crash in the BEAM virtual machine.

Amit Schendel
Amit Schendel
5 views•6 min read
•about 4 hours ago•CVE-2026-48595
8.2

CVE-2026-48595: Cross-Origin Credential Leakage in Elixir Tesla Client via Case-Sensitive Redirect Filter Bypass

A high-severity security vulnerability in Elixir's Tesla HTTP client library (CVE-2026-48595) allows unauthenticated remote attackers to harvest sensitive credentials, including Authorization headers and cookies. The flaw resides in the 'Tesla.Middleware.FollowRedirects' component, which performs case-sensitive lookups when stripping credentials during cross-origin redirects. Because HTTP headers are case-insensitive by RFC specifications, standard canonical casing (e.g., 'Authorization') bypasses the lowercase-only blocklist, leaking tokens to untrusted external redirect destinations.

Alon Barad
Alon Barad
5 views•5 min read