Published:2016/04/22  Last Updated:2016/04/22

JVN#00324715
Electron may insecurely load Node modules

Overview

Electron fails to restrict the path for loading Node modules, which may lead to execution of arbitrary JavaScript.

Products Affected

  • Electron versions prior to 0.33.5

Description

Electron is a software framework for developing cross-platformm desktop applications with web technologies, such as HTML, CSS, JavaScript with Chromium and Node.js. Electron is used in applications such as Atom editor, Microsoft Visual Studio Code, etc..
Electron contains a flaw where the search path for loading Node modules is not restricted properly. This exists due to a flaw in the processing of the 'require' function. When this function is processed, all parent folders for the directory where the module exists is added to the search paths. If an attacker is able to place a malicious Node module in a resulting search path on the victim's system, this Node module will be loaded.

Impact

Loading a malicious Node module placed by an attacker may result in arbitrary programs being executed with the privileges that the application using Electron.

Solution

Update Electron and re-build the application
Developers of applications that use Electron should update Electron and re-build the application.

Vendor Status

Vendor Status Last Update Vendor Notes
Atom Vulnerable 2016/04/22 Atom website

References

JPCERT/CC Addendum

Vulnerability Analysis by JPCERT/CC

CVSS v3 CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L
Base Score: 5.3
Attack Vector(AV) Physical (P) Local (L) Adjacent (A) Network (N)
Attack Complexity(AC) High (H) Low (L)
Privileges Required(PR) High (H) Low (L) None (N)
User Interaction(UI) Required (R) None (N)
Scope(S) Unchanged (U) Changed (C)
Confidentiality Impact(C) None (N) Low (L) High (H)
Integrity Impact(I) None (N) Low (L) High (H)
Availability Impact(A) None (N) Low (L) High (H)
CVSS v2 AV:N/AC:M/Au:N/C:P/I:P/A:P
Base Score: 6.8
Access Vector(AV) Local (L) Adjacent Network (A) Network (N)
Access Complexity(AC) High (H) Medium (M) Low (L)
Authentication(Au) Multiple (M) Single (S) None (N)
Confidentiality Impact(C) None (N) Partial (P) Complete (C)
Integrity Impact(I) None (N) Partial (P) Complete (C)
Availability Impact(A) None (N) Partial (P) Complete (C)

Credit

Yosuke HASEGAWA of Secure Sky Technology Inc. reported this vulnerability to IPA.
JPCERT/CC coordinated with the developer under Information Security Early Warning Partnership.

Other Information

JPCERT Alert
JPCERT Reports
CERT Advisory
CPNI Advisory
TRnotes
CVE CVE-2016-1202
JVN iPedia JVNDB-2016-000054

Update History

2016/04/22
Information under the section "Vulnerability Analysis by JPCERT/CC" was modified.