协议处理程序漏洞修复
已发现一个远程代码执行漏洞,该漏洞影响使用自定义协议处理程序的 Electron 应用。此漏洞已被分配 CVE 标识符 CVE-2018-1000006。
¥A remote code execution vulnerability has been discovered affecting Electron apps that use custom protocol handlers. This vulnerability has been assigned the CVE identifier CVE-2018-1000006.
受影响的平台
¥Affected Platforms
设计为在 Windows 上运行的 Electron 应用,如果将自己注册为某个协议(例如 myapp://
)的默认处理程序,则容易受到攻击。
¥Electron apps designed to run on Windows that register themselves as the default
handler for a protocol, like myapp://
, are vulnerable.
无论协议如何注册(例如使用原生代码、Windows 注册表或 Electron 的 app.setAsDefaultProtocolClient API),此类应用都可能受到影响。
¥Such apps can be affected regardless of how the protocol is registered, e.g. using native code, the Windows registry, or Electron's app.setAsDefaultProtocolClient API.
macOS 和 Linux 均不易受此问题影响。
¥macOS and Linux are not vulnerable to this issue.
缓解措施
¥Mitigation
我们已发布 Electron 的新版本,其中包含针对此漏洞的修复:1.8.2-beta.5
、1.7.12
和 1.6.17
。我们敦促所有 Electron 开发者立即将其应用更新到最新的稳定版本。
¥We've published new versions of Electron which include fixes for
this vulnerability:
1.8.2-beta.5
,
1.7.12
,
and 1.6.17
.
We urge all Electron developers to update their apps to the latest stable
version immediately.
如果由于某种原因你无法升级 Electron 版本,你可以在调用 app.setAsDefaultProtocolClient 时将 --
作为最后一个参数附加,这样可以防止 Chromium 解析其他选项。双破折号 --
表示命令选项的结束,之后仅接受位置参数。
¥If for some reason you are unable to upgrade your Electron version,
you can append --
as the last argument when calling app.setAsDefaultProtocolClient,
which prevents Chromium from parsing further options.
The double dash --
signifies the end of command options,
after which only positional parameters are accepted.
app.setAsDefaultProtocolClient(protocol, process.execPath, [
'--your-switches-here',
'--',
]);
请参阅 app.setAsDefaultProtocolClient API 了解更多详情。
¥See the app.setAsDefaultProtocolClient API for more details.
要了解有关保护 Electron 应用安全的最佳实践的更多信息,请参阅我们的 安全教程。
¥To learn more about best practices for keeping your Electron apps secure, see our security tutorial.
如果你想报告 Electron 中的漏洞,请发送电子邮件至 security@electronjs.org。
¥If you wish to report a vulnerability in Electron, email security@electronjs.org.