/

CVE-2026-44692

Severity:

HIGH RISK

(7.7)

Insecure Direct Object Reference (CWE-639) in Sharp

CVE-2026-44692

Deferred

Vulnerability type

Category:

Insecure Direct Object Reference

CWE:

CWE-639

Impact:

Authenticated Data Disclosure

Severity:

HIGH RISK

(7.7)

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

Sharp's generic download endpoint authorizes the requesting user only against a referenced Sharp entity, but then allows the storage disk and path to be supplied directly via request parameters.

Under these conditions, an authenticated user who can view one valid record may download other unrelated files from configured Laravel Storage disks, leading to unauthorized data disclosure.

Affected context

This vulnerability appears in Laravel applications that embed the Sharp content management framework and expose its generic download endpoint.

It is relevant when:

  • Sharp entities provide downloadable assets or attachments
  • The download route is protected only by entity-level access checks
  • The underlying storage disk name and file path can be influenced by request parameters

The weakness is constrained to the roots of configured Laravel Storage disks and does not, by itself, provide arbitrary host filesystem access.

Exploit preconditions

  • Attack surface: HTTP(S) interface of a Laravel application using Sharp's generic download endpoint
  • Required access: Valid authenticated Sharp user account with permission to view at least one entity instance that exposes the download route
  • Trigger point: Crafted download requests that reference a legitimate entity instance for authorization while specifying arbitrary disk and path parameters pointing to other stored objects
  • Why exploitation is possible: The authorization logic is coupled only to the entity instance, but the file retrieval logic trusts caller-controlled disk/path parameters that are not bound or constrained to the authorized entity's actual storage object

Why this happens

The core issue is an authorization mismatch between the object being authorized and the object ultimately accessed.

The endpoint verifies that the user can access a specific Sharp entity instance but then reads the file disk and path directly from request parameters, without enforcing that the retrieved file belongs to that entity.

This aligns with CWE-639: Insecure Direct Object Reference (IDOR), where user-controllable identifiers (in this case, disk and path) are not properly constrained, enabling access to additional objects that pass through the same endpoint.

Potential impact

  • Authenticated users may download files associated with other entities they are not authorized to view
  • Sensitive business documents, exports, or media stored on configured Laravel Storage disks could be exposed
  • Leakage of configuration-like artifacts, logs, or internal reference data stored within those disks
  • Expansion of an attacker's knowledge of internal object structure and storage layout, aiding further attacks

General mitigation guidance

Effective mitigation focuses on strictly binding file access to the object that was actually authorized.

Common defensive patterns include:

  • Resolving storage disks and paths exclusively from server-side metadata associated with the authorized entity, ignoring client-supplied disk/path parameters
  • Implementing per-entity or per-tenant scoping rules so that download endpoints can only serve files that belong to the authorized record
  • Centralizing file-download logic behind a service that enforces consistent access control decisions and object binding
  • Applying least-privilege design to storage layout, using separate disks or directories per context or role to compartmentalize potential exposure
  • Avoiding generic "passthrough" endpoints that proxy arbitrary disk/path combinations without explicit, object-level permission checks

How teams detect issues like this

Detection can rely on both code-centric and behavior-centric approaches:

  • Static analysis and code review:
  • Flag endpoints that accept disk, path, or similar identifiers directly from user input and use them to read files
  • Look for authorization checks that validate only an entity ID but then operate on separately provided resource identifiers
  • Review any "generic download" or "file proxy" controllers for missing binding between authorized entities and retrieved files
  • Runtime and log analysis:
  • Monitor download requests for patterns where a single authenticated user accesses many distinct paths or unexpected directories
  • Correlate entity IDs used for authorization with the resolved storage paths to spot mismatched object access
  • Policy and tooling:
  • Enforce secure controller patterns via internal guidelines and automated pull request checks
  • Use application security testing tools that simulate IDOR-style manipulation of file-related parameters

Sources

SourceLink
github.comgithub.com/code16/sharp/releases/tag/v9.22.0
github.comgithub.com/code16/sharp/security/advisories/GHSA-748w-hm6r-qc7v

Frequently asked

questions

Yes, but only by authenticated users of the Sharp-based application. The attack occurs over standard HTTP(S) requests to the generic download endpoint and does not require local system access.

The attacker must have a valid Sharp user account with permission to view at least one entity instance that exposes the download functionality. From there, they can manipulate disk and path parameters to attempt access to other stored files.

The most robust fix is to remove trust in client-supplied disk and path parameters and instead derive the storage location exclusively from server-side data bound to the authorized entity. Every downloaded file should be resolved from that entity's metadata, with no opportunity for the caller to redirect the file lookup.

To prevent similar IDOR problems, design endpoints so that authorization is performed on the same object being accessed, avoid exposing raw identifiers for sensitive resources, and standardize secure file-download patterns across the codebase. Regular access-control-focused code reviews and automated tests that attempt parameter tampering can also help detect these issues early.

Find out what's already
exploitable in your codebase.