The vulnerability, CVE-2026-70174, is a remote code execution flaw in WPF's handling of XPS documents. The root cause is a failure to properly restrict hyperlink navigation originating from potentially malicious XPS files. This allows an attacker to bypass the restrictive XAML reader and instantiate dangerous objects like ObjectDataProvider.
The analysis of the patch reveals three key vulnerable functions:
-
System.Windows.Navigation.NavigationService.OnRequestNavigate: This function had insufficient checks to determine if a navigation event was initiated from an untrusted context. The patch introduces more robust checks, including IsXpsOriginatedNavigation and a traversal of the logical tree to propagate the 'unsafe' status, ensuring that navigations from restrictively-loaded XAML are also treated as unsafe.
-
System.Windows.Markup.RestrictiveXamlXmlReader.Read: This function, which is supposed to enforce security restrictions on XAML, failed to block certain types of URIs, such as UNC paths. This allowed an attacker to cause the application to fetch remote resources. The patch adds the IsBlockedUriValue method to prevent this.
-
System.Windows.Documents.PageContent._LoadPageImpl: This function was susceptible to a denial-of-service attack. When the RestrictiveXamlXmlReader stripped a malicious element from the XAML, this function would attempt to process a null object, leading to a crash. The patch adds exception handling to prevent the crash.
By exploiting the weakness in OnRequestNavigate, an attacker can trigger navigation to a malicious XAML payload. The other vulnerabilities in RestrictiveXamlXmlReader.Read and PageContent._LoadPageImpl represent additional weaknesses in the restrictive XAML handling that are also addressed by the patch.