/

CVE-2026-91144

Severity:

HIGH RISK

(7.5)

Authorization Bypass (CWE-639) in ZFile Download Endpoint

CVE-2026-91144

Deferred

Vulnerability type

Category:

Authorization Bypass

CWE:

CWE-639

Impact:

Unauthorized File Disclosure

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

ZFile through version 5.0.5 does not adequately verify that a requested file is included in the entries permitted by a share link. An attacker who possesses a share link may supply a different file path and download files located beneath the link's shared base directory.

Affected context

The issue occurs in ZFile's share-link download endpoint when file requests are resolved relative to a shared base directory but are not checked against the specific files or entries authorized by the link. Deployments are at risk when share links provide access to sensitive files beneath that directory and an attacker can submit controlled path query parameters.

Exploit preconditions

  • Attack surface: Share-link file download endpoint
  • Required access: A valid share link or equivalent ability to reach the download request
  • Trigger point: A user-controlled file path supplied as a download query parameter
  • Why exploitation is possible: Authorization is associated with the shared base directory but is not consistently enforced against the requested entry

Why this happens

The underlying flaw is an authorization decision based on an overly broad resource boundary. The application resolves a user-controlled path within the share's base directory but fails to confirm that the resulting file is one of the entries explicitly authorized by the share link. This behavior maps to CWE-639: Authorization Bypass Through User-Controlled Key, because attacker-controlled resource identifiers influence access decisions without sufficiently binding the request to the permitted object.

Potential impact

  • An attacker may download unauthorized files from the shared base directory.
  • Confidential documents or application data could be disclosed.
  • Exposed files may contain credentials, tokens, or sensitive configuration.
  • The vulnerability could support further compromise if downloaded data enables access to other systems.

General mitigation guidance

Mitigation generally focuses on making authorization object-specific rather than directory-wide.

Common defensive patterns include:

  • Resolve requested files against a canonical, server-side allowlist of entries associated with the share link.
  • Enforce authorization after path normalization and before opening or streaming the file.
  • Avoid deriving access solely from user-controlled path values or directory containment checks.
  • Use opaque, server-generated file identifiers instead of accepting raw filesystem paths.
  • Apply least-privilege permissions to the service account and limit sensitive files outside shareable storage roots.
  • Return consistent authorization failures without revealing whether other paths exist.

How teams detect issues like this

Organizations can look for this weakness through:

  • Static analysis rules identifying filesystem access controlled directly by query parameters.
  • Code review checks for missing per-object authorization after path normalization.
  • Tests that request files not listed in a share link and verify that access is denied.
  • Policy enforcement requiring server-side allowlists or opaque resource identifiers for shared downloads.
  • Monitoring for repeated download requests containing unusual, enumerated, or unexpected file names.

Automated application security testing can help identify authorization inconsistencies across shared-resource endpoints.

Sources

SourceLink
github.comgithub.com/zfile-dev/zfile
github.comgithub.com/zfile-dev/zfile/blob/5.0.5/src/main/java/im/zhaojun/zfile/module/share/service/ShareLinkFileService.java
github.comgithub.com/zfile-dev/zfile/issues/826
vulncheck.comvulncheck.com/advisories/zfile-through-5.0.5-share-entry-filter-bypass-via-download-endpoint

Frequently asked

questions

Exploitation generally requires possession of a valid share link and access to the associated download endpoint.

Not necessarily. If the share link is usable without authentication, anyone who obtains it may be able to attempt unauthorized file requests.

Authorize the requested file against a server-side list of entries explicitly granted by the share link after canonical path resolution.

Avoid trusting user-controlled resource names, use opaque identifiers where practical, test negative authorization cases, and enforce least-privilege access to shared storage.

Find out what's already
exploitable in your codebase.