The vulnerability stems from an out-of-bounds write in the Brotli decoder, which expands data compressed using Google's widely used Brotli lossless compression algorithm. Microsoft's advisory, published Sunday, warns that successful exploitation can trigger crashes, memory leaks, or remote code execution on devices with vulnerable Brotli binaries or libraries. Attackers may also remotely escalate privileges on systems with unpatched .NET installations that use non-default configurations.
"Applications may be affected if they process Brotli-compressed data through ASP.NET Core request decompression, HttpClient automatic response decompression, or the System.IO.Compression Brotli APIs," Microsoft said. The company noted that Brotli decompression is not enabled by default in out-of-the-box .NET or ASP.NET Core installs; applications must manually opt in.
To address the issue, Microsoft has released updates for .NET 8, .NET 9, .NET 10, and .NET 11 Release Candidate 3, and urged users to update as soon as possible.
While proof-of-concept exploits for Broccoli2Shell have been published on GitHub, no malicious exploitation has been reported in the wild. Microsoft warned that updating the system Brotli library does not protect applications that bundle their own copy of the library. For those unable to patch immediately, blocking incoming Brotli-compressed requests via proxy or firewall, or disabling Brotli decoding, are recommended workarounds.