{"id":21709,"date":"2023-09-22T22:32:33","date_gmt":"2023-09-22T18:32:33","guid":{"rendered":"https:\/\/me-en.kaspersky.com\/blog\/electron-framework-security-issues\/21709\/"},"modified":"2023-09-22T22:32:38","modified_gmt":"2023-09-22T18:32:38","slug":"electron-framework-security-issues","status":"publish","type":"post","link":"https:\/\/me-en.kaspersky.com\/blog\/electron-framework-security-issues\/21709\/","title":{"rendered":"Security of Electron-based desktop applications"},"content":{"rendered":"<p>Early this year I gave you <a href=\"https:\/\/www.kaspersky.com\/blog\/dangers-of-desktop-messengers\/47453\/\" target=\"_blank\" rel=\"noopener nofollow\">five reasons to avoid desktop versions of messengers<\/a>. The fact that many such applications use the Electron framework is one of them. This means that such a messenger works as an additional browser in your system, and its updates are quite difficult to control.<\/p>\n<p>But, as I wrote in that post, it has become clear the problem is much more widespread \u2014 affecting not only messengers but hundreds of other apps as well. Chances are, because of Electron-based apps, you have a many more browsers than you think in your system this very minute\u2026<\/p>\n<h2>What is Electron, and why do application developers want to use it?<\/h2>\n<p>Electron is a cross-platform desktop application development framework that employs web technologies \u2014 mostly HTML, CSS, and JavaScript. It was originally created by GitHub for its source code editor Atom (hence its original name \u2014 Atom Shell). Later on the framework was renamed Electron, ultimately evolving into an extremely popular tool used to create desktop applications for various operating systems, including Windows, macOS, and Linux.<\/p>\n<div id=\"attachment_49036\" style=\"width: 3010px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-49036\" src=\"https:\/\/media.kasperskydaily.com\/wp-content\/uploads\/sites\/37\/2023\/09\/22223017\/electron-framework-security-issues-1-scaled-1-scaled-scaled.jpg\" alt=\"Electron framework official site\" width=\"3000\" height=\"1686\" class=\"size-full wp-image-49036\"><p id=\"caption-attachment-49036\" class=\"wp-caption-text\">Main page of the Electron framework official site. <a href=\"https:\/\/www.electronjs.org\" target=\"_blank\" rel=\"noopener nofollow\">Source<\/a><\/p><\/div>\n<p>Electron itself is based on the Chromium browser engine, which is responsible for displaying web content within a desktop application. So any Electron application is effectively a single website opened in the Chromium browser.<\/p>\n<p>Users usually have no idea at all how the thing works. From their point of view, an Electron application is just another program you install, run in the usual way, give access to some files, occasionally update to the newest version, and so on.<\/p>\n<p>Why has Electron grown so popular with developers? The idea is mainly this: no matter what digital service one might want to create, a web version is still needed. And the Electron framework allows you to develop just the web version and, based on it, produce full-fledged apps for all the desktop operating systems out there.<\/p>\n<p>Electron\u2019s other convenience features include making installation packages, their diagnostics, publication to app stores, and automatic updates.<\/p>\n<div id=\"attachment_49037\" style=\"width: 3010px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-49037\" src=\"https:\/\/media.kasperskydaily.com\/wp-content\/uploads\/sites\/37\/2023\/09\/22223100\/electron-framework-security-issues-2-scaled-1-scaled-scaled.jpg\" alt=\"Mullvad VPN uses the Electron framework, too\" width=\"3000\" height=\"3154\" class=\"size-full wp-image-49037\"><p id=\"caption-attachment-49037\" class=\"wp-caption-text\">Et tu autem, Brute! You can find Electron in apps you least expect to<\/p><\/div>\n<p>Summing up, the Electron framework is popular among developers \u2014 most particularly as it allows to greatly accelerate and simplify the application development process for all desktop operating systems in one go.<\/p>\n<h2>Issues with Electron-based applications<\/h2>\n<p>\nElectron-based applications have a number of drawbacks. The most obvious from the users\u2019 perspective is their sluggishness. Electron-based software is usually resource-intensive and suffers from excessive file size. No wonder: each such app carries <s>its whole home on its back like a snail<\/s> a full-blown Chromium browser. In effect, it operates through that browser \u2014 serving as a sort of intermedium.<\/p>\n<p>Next issue: web browsers are a favorite target of cybercriminals. It\u2019s worth repeating: inside <em>every<\/em> Electron-based app there\u2019s a <strong>separate instance of the Chromium<\/strong> web browser. This means your system may have a dozen additional browsers installed, all of which present a tempting target for criminals.<\/p>\n<p>New, serious vulnerabilities pop up almost weekly in a popular browser like Chrome\/Chromium: so far this year <a href=\"https:\/\/cve.mitre.org\/cgi-bin\/cvekey.cgi?keyword=chrome\" target=\"_blank\" rel=\"nofollow noopener\">more than 70 high, and three critical severity-level vulnerabilities<\/a> have been found in Chromium as of the time of writing. Worse yet, exploits for the world\u2019s most popular browser\u2019s vulnerabilities appear really quick. This means that a good part of Chrome\/Chromium holes are not just abstract bugs you treat as a matter of routine \u2014 they\u2019re vulnerabilities that can be used for attacks by cybercriminals out in the wild.<\/p>\n<div id=\"attachment_49038\" style=\"width: 3010px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-49038\" src=\"https:\/\/media.kasperskydaily.com\/wp-content\/uploads\/sites\/37\/2023\/09\/22223145\/electron-framework-security-issues-3-scaled-1-scaled-scaled.jpg\" alt=\"List of Chrome\/Chromium vulnerabilities found in the first eight months of 2023\" width=\"3000\" height=\"1703\" class=\"size-full wp-image-49038\"><p id=\"caption-attachment-49038\" class=\"wp-caption-text\">Even in fine print, Chromium vulnerabilities found so far in 2023 take up several screens. <a href=\"https:\/\/www.electronjs.org\/apps\" target=\"_blank\" rel=\"noopener nofollow\">Source<\/a><\/p><\/div>\n<p>For the standalone Chrome browser, this isn\u2019t such a serious problem. Google is <em>very<\/em> quick to release patches and rather persistent in convincing users to install them and restart their browser (it even thoughtfully re-opens all their precious tabs after restarting so they don\u2019t need to fear updating).<\/p>\n<p>Things are very different for the Electron-based apps. A Chromium browser built into such an app will only get patched if the app\u2019s vendor has released a new version and successfully communicated to users the need to install it.<\/p>\n<p>So it appears that, with a bunch of installed Electron apps, not only do you have multiple browsers installed on your system, but also little to no control over how updated and secure those browsers are, or how many unpatched vulnerabilities they contain.<\/p>\n<p>The framework\u2019s creators <a href=\"https:\/\/www.electronjs.org\/docs\/latest\/tutorial\/security\" target=\"_blank\" rel=\"nofollow noopener\">know full well about the problem<\/a>, and strongly recommend that app developers release patches on time. Alas, users can only hope that those recommendations are followed.<\/p>\n<div style=\"background-color: #e5f0ec; padding: 10px 25px; margin-bottom: 10px;\">And here\u2019s a fresh example: On September 11, Google fixed the <a href=\"https:\/\/nvd.nist.gov\/vuln\/detail\/CVE-2023-4863\" target=\"_blank\" rel=\"nofollow noopener\">CVE-2023-4863<\/a> vulnerability in <a href=\"https:\/\/chromereleases.googleblog.com\/2023\/09\/stable-channel-update-for-desktop_11.html\" target=\"_blank\" rel=\"nofollow noopener\">Google Chrome<\/a>. At that point, it was already actively exploited in the wild. It allows a remote attacker to perform an out of bounds memory write via a crafted HTML page, which can lead to the execution of arbitrary code. Of course, this bug is present in Chromium and all Electron-based applications. So, all companies using it in their applications will have <a href=\"https:\/\/github.com\/electron\/electron\/pull\/39828\" target=\"_blank\" rel=\"nofollow noopener\">to work on updates<\/a>.<\/div>\n<h2>Which desktop applications are based on Electron?<\/h2>\n<p>\nNot many folks seem to know how incredibly common Electron-based desktop applications are. I\u2019ll bet you are using more than one of them. Check them out yourself:<\/p>\n<ul>\n<li>1Password<\/li>\n<li>Agora Flat<\/li>\n<li>Asana<\/li>\n<li>Discord<\/li>\n<li>Figma<\/li>\n<li>GitHub Desktop<\/li>\n<li>Hyper<\/li>\n<li>Loom<\/li>\n<li>Microsoft Teams<\/li>\n<li>Notion<\/li>\n<li>Obsidian<\/li>\n<li>Polyplane<\/li>\n<li>Postman<\/li>\n<li>Signal<\/li>\n<li>Skype<\/li>\n<li>Slack<\/li>\n<li>Splice<\/li>\n<li>Tidal<\/li>\n<li>Trello<\/li>\n<li>Twitch<\/li>\n<li>Visual Studio Code<\/li>\n<li>WhatsApp<\/li>\n<li>WordPress Desktop<\/li>\n<\/ul>\n<p>I personally use around a third of the apps from the list (but, for the record, none of them as desktop applications).<\/p>\n<p>That list is not exhaustive at all though, representing only the most popular Electron-based applications. In total there are several hundred such applications. A more or less complete list of them can be found on a <a href=\"https:\/\/www.electronjs.org\/apps\" target=\"_blank\" rel=\"nofollow noopener\">special page<\/a> on the official website of the framework (but, it seems, not all of them are listed even there).<\/p>\n<div id=\"attachment_49039\" style=\"width: 3010px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-49039\" src=\"https:\/\/media.kasperskydaily.com\/wp-content\/uploads\/sites\/37\/2023\/09\/22223219\/electron-framework-security-issues-4-scaled-1-scaled-scaled.jpg\" alt=\"List of Electron-based applications \" width=\"3000\" height=\"1697\" class=\"size-full wp-image-49039\"><p id=\"caption-attachment-49039\" class=\"wp-caption-text\">The list of Electron-based desktop applications comprises several hundred online services, including about 20 really popular ones. <a href=\"https:\/\/www.electronjs.org\/apps\" target=\"_blank\" rel=\"noopener nofollow\">Source<\/a><\/p><\/div>\n<h2>Security considerations<\/h2>\n<p>\nSo how to avoid the threats posed by uncontrolled browsers that thoughtful developers are now unpredictably embedding into desktop apps? I have three main tips regarding this:<\/p>\n<ul>\n<li>Minimize the number of Electron-based apps as much as possible. It\u2019s not as difficult as it seems: the very fact of using the framework normally suggests that the service has an extremely advanced web version, which is most likely on a par with the desktop application in terms of features and convenience.<\/li>\n<li>Try to inventory all Electron-based apps used by your company\u2019s employees, and <a href=\"https:\/\/www.kaspersky.com\/blog\/patching-priorities\/48867\/\" target=\"_blank\" rel=\"noopener nofollow\">prioritize their updates<\/a>. More often than not, these are collaboration applications of different forms and shades \u2014 from Microsoft Teams, Slack, and Asana, to GitHub and Figma.<\/li>\n<li>Use <a href=\"https:\/\/me-en.kaspersky.com\/small-to-medium-business-security?icid=me-en_kdailyplacehold_acq_ona_smm__onl_b2b_kasperskydaily_wpplaceholder_______\" target=\"_blank\" rel=\"noopener\">a reliable security solution<\/a>. It will help you repel attacks in those periods when vulnerabilities are already known and being exploited but the patches haven\u2019t yet been issued. By the way, Kaspersky products have an exploit protection system: it <a href=\"https:\/\/www.kaspersky.com\/blog\/nokoyawa-zero-day-exploit\/47788\/\" target=\"_blank\" rel=\"noopener nofollow\">helps <\/a>our experts detect the exploitation of new, as yet unknown vulnerabilities, and warns the developers of the corresponding programs about these holes.<\/li>\n<\/ul>\n<input type=\"hidden\" class=\"category_for_banner\" value=\"kesb-trial\">\n","protected":false},"excerpt":{"rendered":"<p>A few words on why desktop applications based on the Electron framework should be approached with caution.<\/p>\n","protected":false},"author":2726,"featured_media":21711,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1318,1916,1917],"tags":[1636,16,2694,533,1328,121,268,113],"class_list":{"0":"post-21709","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-business","8":"category-enterprise","9":"category-smb","10":"tag-browsers","11":"tag-chrome","12":"tag-electron","13":"tag-linux","14":"tag-macos","15":"tag-updates","16":"tag-vulnerabilities","17":"tag-windows"},"hreflang":[{"hreflang":"en-ae","url":"https:\/\/me-en.kaspersky.com\/blog\/electron-framework-security-issues\/21709\/"},{"hreflang":"en-in","url":"https:\/\/www.kaspersky.co.in\/blog\/electron-framework-security-issues\/26267\/"},{"hreflang":"en-us","url":"https:\/\/usa.kaspersky.com\/blog\/electron-framework-security-issues\/28952\/"},{"hreflang":"en-gb","url":"https:\/\/www.kaspersky.co.uk\/blog\/electron-framework-security-issues\/26558\/"},{"hreflang":"ru","url":"https:\/\/www.kaspersky.ru\/blog\/electron-framework-security-issues\/36075\/"},{"hreflang":"x-default","url":"https:\/\/www.kaspersky.com\/blog\/electron-framework-security-issues\/49035\/"},{"hreflang":"ru-kz","url":"https:\/\/blog.kaspersky.kz\/electron-framework-security-issues\/26781\/"},{"hreflang":"en-au","url":"https:\/\/www.kaspersky.com.au\/blog\/electron-framework-security-issues\/32560\/"},{"hreflang":"en-za","url":"https:\/\/www.kaspersky.co.za\/blog\/electron-framework-security-issues\/32213\/"}],"acf":[],"banners":"","maintag":{"url":"https:\/\/me-en.kaspersky.com\/blog\/tag\/vulnerabilities\/","name":"vulnerabilities"},"_links":{"self":[{"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts\/21709","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/users\/2726"}],"replies":[{"embeddable":true,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/comments?post=21709"}],"version-history":[{"count":1,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts\/21709\/revisions"}],"predecessor-version":[{"id":21710,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts\/21709\/revisions\/21710"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/media\/21711"}],"wp:attachment":[{"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/media?parent=21709"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/categories?post=21709"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/tags?post=21709"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}