CVE-2020-8215: Buffer overflow in canvas

canvas Updated 02 Oct 2025

Summary

07/05/2021
Yes i
High
8.8

CVE-2020-8215: Buffer overflow in canvas. Affects canvas versions < 1.6.11. Fixed in 1.6.11. 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 package is an npm package that provides a JavaScript implementation of the HTML5 canvas element. It allows developers to draw graphics, animations, and images on a web page using JavaScript. The canvas package is widely used in web development projects to create interactive and visually appealing applications. However, versions of the canvas package before 1.6.11 are vulnerable to a buffer overflow. This vulnerability can be exploited by an attacker to cause a Denial of Service or execute arbitrary code when processing a user-provided image.

Vulnerability Detail

The buffer overflow vulnerability in the canvas package arises from a lack of proper input validation and boundary checks when processing user-provided images. An attacker can craft a malicious image that triggers the buffer overflow, leading to a crash of the application or potential execution of arbitrary code. This can result in a complete compromise of the affected system, allowing the attacker to gain unauthorized access, steal sensitive information, or perform other malicious activities. The vulnerability has a CVSS score of 8.8, indicating a high severity level.

How To Fix

Latest published version: 3.2.3 as of 23 Oct 2026

npm install canvas@3.2.3

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.6.11

This is the first release that contains the fix.

npm install canvas@1.6.11

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Conclusion

The canvas package is vulnerable to a buffer overflow, which can result in a Denial of Service or execution of arbitrary code. It is crucial for developers to upgrade to version 1.6.11 or later to mitigate this vulnerability. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for canvas →

Share this vulnerability

FAQ

The canvas package is an npm package that provides a JavaScript implementation of the HTML5 canvas element. It is used for drawing graphics, animations, and images on web pages.

A buffer overflow is a vulnerability that occurs when a program writes data beyond the boundaries of a buffer, causing memory corruption and potentially allowing an attacker to execute arbitrary code.

The buffer overflow in the canvas package can be exploited by crafting a malicious image that triggers the overflow when processed by the package. This can lead to a crash of the application or execution of arbitrary code.

The potential consequences of this vulnerability include a Denial of Service, unauthorized access to the affected system, theft of sensitive information, and execution of arbitrary code.

Yes, the vulnerability can be fixed by upgrading the canvas package to version 1.6.11 or later.

Related vulnerabilities

Recent vulnerabilities recorded for canvas.

How To Fix

Latest published version: 3.2.3 as of 23 Oct 2026

npm install canvas@3.2.3

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.6.11

This is the first release that contains the fix.

npm install canvas@1.6.11

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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