VYPR
Low severity2.8NVD Advisory· Published Apr 7, 2026· Updated Apr 16, 2026

CVE-2026-34781

CVE-2026-34781

Description

Electron is a framework for writing cross-platform desktop applications using JavaScript, HTML and CSS. Prior to 39.8.5, 40.8.5, 41.1.0, and 42.0.0-alpha.5, apps that call clipboard.readImage() may be vulnerable to a denial of service. If the system clipboard contains image data that fails to decode, the resulting null bitmap is passed unchecked to image construction, triggering a controlled abort and crashing the process. Apps are only affected if they call clipboard.readImage(). Apps that do not read images from the clipboard are not affected. This issue does not allow memory corruption or code execution. This vulnerability is fixed in 39.8.5, 40.8.5, 41.1.0, and 42.0.0-alpha.5.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
electronnpm
< 39.8.539.8.5
electronnpm
>= 40.0.0-alpha.1, < 40.8.540.8.5
electronnpm
>= 41.0.0-alpha.1, < 41.1.041.1.0
electronnpm
>= 42.0.0-alpha.1, < 42.0.0-alpha.542.0.0-alpha.5

Affected products

6
  • cpe:2.3:a:electronjs:electron:41.2.0:*:*:*:*:node.js:*:*+ 5 more
    • cpe:2.3:a:electronjs:electron:41.2.0:*:*:*:*:node.js:*:*
    • cpe:2.3:a:electronjs:electron:42.0.0:alpha1:*:*:*:node.js:*:*
    • cpe:2.3:a:electronjs:electron:42.0.0:alpha2:*:*:*:node.js:*:*
    • cpe:2.3:a:electronjs:electron:42.0.0:alpha3:*:*:*:node.js:*:*
    • cpe:2.3:a:electronjs:electron:42.0.0:alpha4:*:*:*:node.js:*:*
    • cpe:2.3:a:electronjs:electron:*:*:*:*:*:node.js:*:*range: <=39.8.4

Patches

1
a48f03fb8d03

fix: crash in clipboard.readImage() on malformed image data (#50475)

https://github.com/electron/electronSamuel AttardMar 25, 2026via ghsa
1 file changed · +5 1
  • shell/common/api/electron_api_clipboard.cc+5 1 modified
    @@ -378,7 +378,11 @@ gfx::Image Clipboard::ReadImage(gin::Arguments* const args) {
               [](std::optional<gfx::Image>* image, base::RepeatingClosure cb,
                  const std::vector<uint8_t>& result) {
                 SkBitmap bitmap = gfx::PNGCodec::Decode(result);
    -            image->emplace(gfx::Image::CreateFrom1xBitmap(bitmap));
    +            if (bitmap.isNull()) {
    +              image->emplace();
    +            } else {
    +              image->emplace(gfx::Image::CreateFrom1xBitmap(bitmap));
    +            }
                 std::move(cb).Run();
               },
               &image, std::move(callback)));
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

9

News mentions

0

No linked articles in our index yet.