CVE-2026-58588: Drupal Canvas Module Image Upload Vulnerability

drupal/canvas Updated 02 Jul 2026

Summary

01/07/2026
Yes i
Unrated
Not published

CVE-2026-58588: The Canvas module allow you to upload image files via a custom API. Affects drupal/canvas across 4 version ranges.

< 1.4.2 >= 1.5.0, < 1.5.2 >= 1.6.0, < 1.6.1 >= 1.7.0, < 1.7.1

Fixed in 4 releases; the minimum fixed version depends on the release line you run. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The Canvas module for Drupal allows users to upload image files through a custom API. It is designed to facilitate image handling within Drupal applications, providing features for image manipulation and display. However, the module has a critical vulnerability that arises from inadequate file validation, specifically concerning MIME type checks.

Vulnerability Detail

The vulnerability stems from the Canvas module's failure to validate the MIME type of uploaded files, relying solely on file extension checks. This oversight permits malicious users to upload non-image files disguised as images. If the web server is configured to serve files with their actual MIME type, this could lead to cross-site scripting (XSS) attacks or other unexpected behaviors, compromising the security of the application and its users.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 1.4.2 1.4.2
  • >= 1.5.0, < 1.5.2 1.5.2
  • >= 1.6.0, < 1.6.1 1.6.1
  • >= 1.7.0, < 1.7.1 1.7.1

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

As a temporary workaround, you can implement server-side restrictions to ensure that only files with valid image MIME types are processed. This can be done by configuring your web server to check MIME types before serving uploaded files.

Conclusion

The vulnerability identified as CVE-2026-58588 in the Drupal Canvas module poses significant security risks due to inadequate file validation. It is crucial for users of this module to update to the latest patched versions to safeguard their applications against potential attacks.

See every vulnerability recorded for drupal/canvas →

Share this vulnerability

FAQ

CVE-2026-58588 is a vulnerability in the Drupal Canvas module that allows for the upload of non-image files due to insufficient MIME type validation.

You can check if your application is affected by using Vulert, which monitors open-source vulnerabilities in your software. Visit Vulert Scanner to analyze your manifest file.

The risks include potential cross-site scripting (XSS) attacks and other unexpected behaviors that could compromise user data and application integrity.

You can update the Canvas module using Composer with the command: composer require drupal/canvas:^1.4.2 to ensure you are using a secure version.

Yes, you can implement server-side restrictions to validate the MIME types of uploaded files as a temporary workaround until the module is updated.

Related vulnerabilities

Recent vulnerabilities recorded for drupal/canvas.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 1.4.2 1.4.2
  • >= 1.5.0, < 1.5.2 1.5.2
  • >= 1.6.0, < 1.6.1 1.6.1
  • >= 1.7.0, < 1.7.1 1.7.1

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback