Use After Free Affecting electron package, versions >=11.0.0-beta.1 <11.4.0<10.4.1


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Mature
EPSS
1.14% (86th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Use After Free vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-ELECTRON-1085705
  • published16 Mar 2021
  • disclosed15 Mar 2021
  • creditUnknown

Introduced: 15 Mar 2021

CVE-2021-21193  (opens in a new tab)
CWE-416  (opens in a new tab)

How to fix?

Upgrade electron to version 11.4.0, 10.4.1 or higher.

Overview

electron is a framework which lets you write cross-platform desktop applications using JavaScript, HTML and CSS.

Affected versions of this package are vulnerable to Use After Free. When a LayoutInline is removed, LineBoxList::DirtyLinesFromChangedChild tries to mark affected RootInlineBox dirty.

When the |LayoutInline| to be removed is culled, it tries to find the RootInlineBox from its previous siblings, then look for its previous and next RootInlineBoxes.

Occasionally, the next next line of the previous sibling is wrapped at the LayoutInline, and that its LineBreakObj() holds the reference to the LayoutInline. This patch marks such RootInlineBox dirty.

CVSS Scores

version 3.1