CVE-2026-70354
This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.
Overview
.NET is a free, open-source, cross-platform framework for building modern apps and powerful cloud services. It consists of a runtime and a developer platform made up of tools, programming languages, and libraries for building many different types of applications.
A Remote Code Execution vulnerability (CVE-2026-70354) has been identified in Windows Presentation Foundation (WPF), which allows an unauthorized attacker to execute code. WPF's pixel shader translator walks shader bytecode twice — once to size an instruction buffer and once to decode into it — and the two passes disagreed about how to handle a no-op instruction, so the second pass could emit more instructions than the first had allocated room for.
Per CWE-787: Out-of-bounds Write, the product writes data past the end, or before the beginning, of the intended buffer.
This issue affects .NET 6. WPF ships as part of the Microsoft.WindowsDesktop.App shared framework and is Windows-only. Any application that loads a PixelShader from attacker-influenced bytecode — including one embedded in a XAML document or a compiled effect shipped alongside untrusted content — should be treated as reachable.
Details
Module Info
- Product: .NET
- Affected packages: Windows Presentation Foundation (ships in the Microsoft.WindowsDesktop.App shared framework)
- Affected versions: Microsoft.WindowsDesktop.App >= 6.0.0 <= 6.0.43
- GitHub repository: https://github.com/dotnet/wpf
- Published packages: Download .NET (Linux, macOS, and Windows)
- Package manager: NuGet
- Fixed in: NES for .NET 6.0.44
Vulnerability Info
This High-severity vulnerability is found in WPF's native pixel shader translation code. Initialization is a two-pass algorithm over the same bytecode: the first pass counts instructions in order to allocate an appropriately sized instruction buffer, and the second pass decodes the bytecode into that buffer.
The two passes handled the no-op opcode differently. The second pass had a dedicated case for it and stopped consuming immediately, since a no-op carries no parameter tokens. The first pass had no such case, so a no-op fell through to the generic branch — which consumes every following token whose high bit is set, treating them as parameters belonging to the instruction.
A shader that places a high-bit token directly after a no-op therefore causes the first pass to swallow tokens the second pass will treat as the start of new instructions. The first pass counts fewer instructions than the second decodes, the buffer is sized too small, and the second pass writes past its end. Because the extra instructions are themselves drawn from attacker-supplied bytecode, both the length and the content of the overflow are influenced by the attacker, which is what elevates this from a memory-safety crash to remote code execution.
The fixed release closes the divergence at its source: the counting pass now rejects a shader whose no-op is followed by a parameter token, failing initialization rather than producing a count the decode pass will exceed.
The check is gated on the existing WPF graphics bounds-check switch that this file already consults in several other places, and which defaults to protection enabled.
Mitigation
.NET 6 is End-of-Life and will not receive any updates to address this issue. For more information see .NET and .NET Core official support policy.
Users of the affected components should apply one of the following mitigations:
- Upgrade affected applications to one of:
- .NET >= 8.0.30
- .NET >= 9.0.19
- .NET >= 10.0.11
- Leverage a commercial support partner like HeroDevs for post-EOL security support, including NES for .NET 6.0.44 or later.
Credits
Microsoft has not published attribution for this vulnerability; the acknowledgements section of the .NET advisory is listed as TBD as of August 11, 2026.