PHP
CVE-2026-33687
HIGH
Severity by source
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Primary rating from GitHub Advisory · only source for this CVE.
CVSS VectorGitHub Advisory
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Lifecycle Timeline
3DescriptionGitHub Advisory
Summary
The code16/sharp Laravel admin panel package contains a vulnerability in its file upload endpoint that allows authenticated users to bypass all file type restrictions.
Details
The upload endpoint within the ApiFormUploadController accepts a client-controlled validation_rule parameter. This parameter is directly passed into the Laravel validator without sufficient server-side enforcement. By intercepting the request and sending validation_rule[]=file, an attacker can completely bypass all MIME type and file extension restrictions. The vulnerable code is located in src/Http/Controllers/Api/ApiFormUploadController.php at line 24.
Impact
This vulnerability leads to several critical security risks:
Attackers can upload arbitrary files, including PHP webshells, to the server. For more details on the package, visit: https://github.com/code16/sharp
MIME type and extension validation can be bypassed entirely via client-controlled rules. Review the CWE definition here: https://cwe.mitre.org/data/definitions/434.html
If the storage disk is configured to be publicly accessible, this can lead to Remote Code Execution (RCE). See the vendor repository: https://github.com/code16/sharp
(Note: Under default configurations, executing uploaded PHP files directly is not possible unless a public disk configuration is in place.)
Patches
This issue has been addressed by removing the client-controlled validation rules and strictly defining upload rules server-side. The fix is available in pull request https://github.com/code16/sharp/pull/714.
Workarounds
- Restrict Disk Access: Ensure that the storage disk used for Sharp uploads is strictly private. Under default configurations, an attacker cannot directly execute uploaded PHP files unless a public disk configuration is explicitly used. For more details on Laravel disk configurations, visit: https://laravel.com/docs/13.x/filesystem
Credits
Reported by zaurgsynv.
AnalysisAI
The code16/sharp Laravel admin panel package contains a critical file upload vulnerability that allows authenticated users to bypass all file type restrictions by manipulating client-controlled validation rules. Affected versions prior to 9.20.0 accept a user-supplied validation_rule parameter that is passed directly to Laravel's validator, enabling attackers to upload arbitrary files including PHP webshells. With a CVSS score of 8.8, this vulnerability can lead to Remote Code Execution when the storage disk is publicly accessible, though default configurations provide some protection against direct execution.
Technical ContextAI
This vulnerability affects the code16/sharp Laravel admin panel package (pkg:composer/code16_sharp), a content management framework for Laravel applications. The flaw is classified as CWE-434 (Unrestricted Upload of File with Dangerous Type) and exists in the ApiFormUploadController.php file at line 24. The vulnerable code accepts a client-controlled validation_rule parameter during file uploads and passes it directly to Laravel's validator without server-side enforcement. By sending validation_rule[]=file in the upload request, attackers can override intended MIME type and file extension restrictions that should be enforced server-side. This represents a fundamental failure in input validation where trust is placed in client-supplied security controls rather than implementing defense-in-depth with mandatory server-side validation.
RemediationAI
Upgrade code16/sharp to version 9.20.0 or later, which removes client-controlled validation rules and implements strict server-side upload validation as documented in pull request https://github.com/code16/sharp/pull/714. The patched release is available at https://github.com/code16/sharp/releases/tag/v9.20.0. As an interim workaround until patching is possible, ensure that the Laravel storage disk used for Sharp uploads is configured as strictly private and not publicly accessible, preventing direct execution of uploaded files. Review your Laravel filesystem configuration at config/filesystems.php to verify that Sharp uploads are directed to a private disk rather than the public disk. Additional defense-in-depth measures include implementing web application firewall rules to detect and block suspicious file upload patterns, restricting admin panel access to trusted IP ranges, and monitoring upload directories for unauthorized PHP files or webshells. Refer to Laravel's filesystem documentation at https://laravel.com/docs/13.x/filesystem for guidance on secure disk configuration.
sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not
(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear
ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C
Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au
Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP c
Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
The get_referers function in /opt/ws/bin/sblistpack in Sophos Web Appliance before 3.7.9.1 and 3.8 before 3.8.1.1 allows
The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1
NetAlertX (formerly PiAlert) versions 23.01.14 through 24.x before 24.10.12 allow unauthenticated command injection thro
The GiveWP - Donation Plugin and Fundraising Platform plugin for WordPress is vulnerable to PHP Object Injection in all
Same technique File Upload
View allShare
External POC / Exploit Code
Leaving vuln.today