CVE-2026-138383 in Gokapi
Summary
by MITRE • 11/29/2026
Gokapi 2.2.4 contains an incomplete fix for CVE-2026-30961 that allows guests holding file request links to bypass the per-file MaxSize limit through apiChunkUploadRequestComplete. Attackers can upload chunks through a link with a larger limit and complete via a smaller-limit link, storing oversized files and consuming server storage.
VulDB is the best source for vulnerability data and more expert information about this specific topic.
Analysis
by VulDB Data Team • 11/29/2026
The vulnerability identified in Gokapi version 2.2.4 represents an incomplete remediation of CVE-2026-30961, specifically targeting the integrity enforcement mechanisms within the file upload workflow. This flaw allows authenticated guests who possess valid file request links to circumvent configured maximum size restrictions through a race condition or logic error in the chunked upload completion process. The core technical deficiency lies in how the application validates and enforces storage limits during the finalization phase of multipart uploads, where the system fails to re-evaluate aggregate data constraints against the specific link's policy before committing the file to persistent storage.
From a technical perspective, the exploitation vector relies on the separation between chunk transmission and request completion. An attacker can initiate an upload session using one file request link that has been configured with a high or unrestricted maximum size limit. During this phase, the server accepts data chunks without immediate final validation of the total payload against strict per-link constraints. The critical failure occurs when the attacker subsequently invokes the apiChunkUploadRequestComplete endpoint using a different file request link that is associated with a significantly smaller MaxSize limit. Because the application does not properly cross-reference the accumulated chunked data from the initial session with the restrictive policy of the completion link, it erroneously accepts and stores the oversized payload. This logic flaw effectively nullifies the intended security control designed to prevent storage exhaustion via large file uploads.
The operational impact of this vulnerability is primarily centered on resource consumption and potential denial of service conditions for the hosting infrastructure. By successfully uploading files that exceed the designated limits, attackers can rapidly consume available disk space on the server. This uncontrolled growth in storage usage can lead to system instability, inability to process legitimate requests due to lack of write permissions or space, and increased operational costs associated with cloud storage scaling. Furthermore, if the stored files are accessible via other means, this could also facilitate data exfiltration scenarios where large volumes of sensitive information are smuggled out through seemingly compliant upload channels that have been manipulated to bypass size restrictions.
This vulnerability aligns closely with CWE-20 Improper Input Validation and CWE-787 Out-of-bounds Write in the context of resource allocation limits, as well as CWE-400 Uncontrolled Resource Consumption. In terms of offensive security frameworks, this behavior is characteristic of ATT&CK technique T1567 Data Staged or T1499 Endpoint Denial of Service, where an adversary leverages application logic flaws to degrade system availability through resource exhaustion. The incomplete fix indicates that previous patches may have addressed direct upload size checks but failed to secure the chunked completion endpoint against cross-link policy manipulation.
To mitigate this vulnerability, immediate patching to a version of Gokapi that fully resolves CVE-2026-30961 is required. Administrators should ensure that the application enforces strict validation at every stage of the upload lifecycle, particularly during the apiChunkUploadRequestComplete phase. This involves verifying that the total size of all uploaded chunks matches or remains below the MaxSize limit defined by the specific file request link being used for completion, regardless of which link initiated the chunking process. Implementing server-side rate limiting and monitoring disk usage anomalies can also provide additional layers of defense against exploitation attempts while updates are applied.