Drupal Security Advisory
DRUPAL-CONTRIB-2026-066
Details
The Canvas module allow you to upload image files via a custom API.
The validation rules check the file extension of the uploaded file but not the file MIME type. This may allow a malicious user to upload a file that is not an image.
Certain web-server configurations may serve the uploaded file with its actual MIME type rather than an image type. This may lead to cross-site scripting (XSS) or other unexpected behavior.
Affected packages
| Ecosystem | Package | Affected versions |
|---|---|---|
| Packagist:https://packages.drupal.org/8 | drupal/canvas | All versions before 1.4.2 (fixed in 1.4.2) From 1.5.0 before 1.5.2 (fixed in 1.5.2) From 1.6.0 before 1.6.1 (fixed in 1.6.1) From 1.7.0 before 1.7.1 (fixed in 1.7.1) |