SBN

June Vulnerability of the Month: Electron Vulnerability Out-Hyped by Efail?

Every month, we ask our researchers to nominate a vulnerability of the month. Novelty, sophistication or just plain weirdness are some of the potential criteria for selecting a vulnerability to highlight. After the nominations are collected, the candidates are shortlisted and voted on by our 70-plus-member research organization, combining the total experience and knowledge of Tenable Research to identify the vulnerability of the month.

Background

Electron is an open-source framework for developing desktop applications. According to Electron’s website, it’s currently used in 581 apps. On May 14, a vulnerability (CVE-2018-1000136) was publicly disclosed that could potentially result in remote code execution (RCE). This isn’t the same vulnerability as CVE-2018-1000006, a different critical RCE vulnerability disclosed in January with a faulty patch that received media attention at the time.

What makes this the vulnerability of the month?

This is a good example of the competition for attention in vulnerability disclosure. CVE-2018-1000136 was disclosed the week before eFail, the email encryption vulnerability that temporarily sent the security world into a tizzy. The Efail kerfuffle played out for a few days before cooler heads prevailed and remembered that a name and a flashy logo do not an apocalypse make.

This Electron vulnerability, while serious, may have also been overhyped. Electron states that only a minority of applications have the (very) specific configuration which would make them vulnerable. However, Electron is used by big names like Discord, Slack, Signal, Skype and WordPress, making it attractive headline fodder. Neither Electron nor the researcher who discovered the vulnerability confirmed its presence in any specific applications. But, without concern for any evidence, the coverage focused on Electron’s use in popular applications. In fact, Slack took to Twitter to confirm that it wasn’t vulnerable.

Cross-site scripting vulnerabilities aren’t routinely prioritized

What’s noteworthy about this vulnerability is that it relies on cross-site scripting (XSS), one of the most popular types of web application security vulnerabilities. By exploiting low-hanging fruit like XSS, attackers can modify HTML and JavaScript code served by a webpage to execute arbitrary code on a client, gaining access to escalate privileges and execute lateral transfer. Organizations may not always prioritize XSS vulnerabilities as highly as others, but it’s important to understand how several lower severity vulnerabilities can be combined to create a greater risk to an organization.

Vulnerability details

Discovered by Brendan Scarvell of Trustwave’s SpiderLabs, this vulnerability is present in Electron versions 1.7.x, 1.8.x and 2.0.0-beta and could result in RCE. By default, Electron applications allow access to Node.js, a client-side JavaScript runtime environment. If an electron application contains an XSS attack, whereby the application fails to properly sanitize user input, an attacker can re-enable the nodeIntegration setting via the WebView embedding function and the window.open command. If exploited, the attacker can execute arbitrary code.

By default, nodeIntegration is set to false, but this vulnerability allows it to be enabled, giving attackers access to Node.js built-in modules and potential RCE. However, this isn’t a trivial vulnerability to exploit. Several conditions have to be met for exploitation.

According to Electron, an application is affected if all of the following are true:

  • Runs on Electron 1.7, 1.8, or a 2.0.0-beta
  • Allows execution of arbitrary remote code
  • Disables Node.js integration
  • Does not explicitly declare webviewTag: false in its webPreferences
  • Does not enable the nativeWindowOption option
  • Does not intercept new-window events and manually override event.newGuest without using the supplied options tag

Despite this, Electron recommend updating all applications to the latest version.

Additional resources

*** This is a Security Bloggers Network syndicated blog from Tenable Blog authored by Tenable Research. Read the original post at: http://feedproxy.google.com/~r/tenable/qaXL/~3/GWLbcCufg1Y/june-vulnerability-of-the-month-electron-vulnerability-out-hyped-by-efail