| Title | Bagisto 2.4.11 Unrestricted Upload of File with Dangerous Type |
|---|
| Description | Bagisto is affected by an unrestricted file upload vulnerability that leads to authenticated remote code execution. In the admin catalog attribute create and update flow (POST /admin/catalog/attributes/create), the controller Webkul\Admin\Http\Controllers\Catalog\AttributeController validates only an attribute option's text fields (swatch_alt, swatch_file_name) and applies no image, MIME, or extension validation to the uploaded file options.*.swatch_value. The repository method Webkul\Attribute\Repositories\AttributeOptionRepository::uploadSwatchImage then writes the raw bytes to Laravel's default public disk using an extension taken from the client-supplied filename (getClientOriginalExtension), under storage/app/public/attribute_option, which is served at APP_URL/storage. An authenticated admin-panel user with the catalog.attributes.create permission can intercept the save request and replace the swatch image with a PHP file which is stored as, /storage/attribute_option/shell.php for example. The file is executed when requested, yielding command execution as the web server user. Because catalog.attributes.create is a distinct ACL permission, a role granted only attribute management can use this to obtain code execution as well. |
|---|
| Source | ⚠️ https://gist.github.com/k4z01/bca784b98599ee51fe0548af0f80bb11 |
|---|
| User | k4z0 (UID 101097) |
|---|
| Submission | 11/05/2026 20:22 (27 days ago) |
|---|
| Moderation | 12/02/2026 18:14 (27 days later) |
|---|
| Status | Accepted |
|---|
| VulDB entry | 447949 [Webkul Bagisto up to 2.4.10 Catalog Attribute Option Swatch Upload AttributeOptionRepository.php uploadSwatchImage swatch_value unrestricted upload] |
|---|
| Points | 20 |
|---|