Authorization Bypass Through User-Controlled Key Affecting code16/sharp package, versions <9.22.0


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Authorization Bypass Through User-Controlled Key vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PHP-CODE16SHARP-16700565
  • published15 May 2026
  • disclosed15 May 2026
  • creditbaradika

Introduced: 15 May 2026

NewCVE-2026-44692  (opens in a new tab)
CWE-639  (opens in a new tab)

How to fix?

Upgrade code16/sharp to version 9.22.0 or higher.

Overview

Affected versions of this package are vulnerable to Authorization Bypass Through User-Controlled Key via the generic download endpoint when the disk and path parameters are supplied in the request. An attacker can access unrelated files stored on configured storage disks by manipulating these parameters without needing authorization to the specific storage object. This is only exploitable if the attacker has an authenticated session and view access to at least one valid entity instance.

Workaround

This vulnerability can be mitigated by restricting downloads.allowed_disks to the minimum required set and ensuring sensitive files are not stored on disks accessible by the generic download endpoint. Application-level controls should also be implemented to bind requested files to the authorized record.

CVSS Base Scores

version 4.0
version 3.1