Repository navigation
Description
Problem Statement
SentryOptions.DecompressionMethods defaults to every method the platform supports:
public DecompressionMethods DecompressionMethods { get; set; }
// Note the ~ enabling all bits
= ~DecompressionMethods.None;DefaultSentryHttpClientFactory assigns it to the transport's HttpClientHandler.AutomaticDecompression:
So on .NET Core 3.0+ every app using the SDK decodes Brotli on responses from its Sentry ingest endpoint, even if the app never opts into Brotli anywhere else.
CVE-2026-111497 (CVSS 8.1, CWE-787) is a memory-safety bug in the Brotli decoder that .NET bundles. It is fixed in .NET 8.0.33, 9.0.22 and 10.0.14 (dotnet/runtime#136446). The advisory's exposure section says:
ASP.NET Core and HttpClient do not automatically decompress Brotli data in their default configurations. [...] An application is not exposed merely because an affected .NET package is installed.
It then lists AutomaticDecompression including DecompressionMethods.Brotli or DecompressionMethods.All as an exposed path. ~DecompressionMethods.None is the same value as DecompressionMethods.All, so the SDK default reverses the platform's safe default: apps that would otherwise be out of scope are in scope only because they use Sentry.
Reaching the decoder requires control of the response from the configured DSN host (a compromised or impersonated endpoint, a self-hosted relay, or a proxy), so the practical risk is low. But the exposure is easy to miss. Teams auditing for this CVE check their own AutomaticDecompression settings, and they find this one only by reading SDK source.
The default is unchanged on main (as of b41b96c) and in 7.0.0-rc.2.
This is defense in depth, not a fix: patched runtimes (8.0.33, 9.0.22, 10.0.14) already close the CVE.
Solution Brainstorm
- Change the default to
DecompressionMethods.GZip | DecompressionMethods.Deflate. Sentry responses to envelope submissions are small JSON, so Brotli adds little. 7.0 is a natural place for a default change. - Or keep the default but document it: call out in the option's XML docs and the docs site that it enables Brotli, and how to set it explicitly.
- Users can mitigate today with
options.DecompressionMethods = DecompressionMethods.GZip | DecompressionMethods.Deflate;or by patching the runtime.
Metadata
Metadata
Assignees
Projects
- StatusShow more project fieldsWaiting for: Product Owner
Activity
linear-code commentedon Oct 26, 2026
NET-887
jamescrosswell commentedon Oct 27, 2026
Thanks @jmbryan4 - we'll add this as a defensive measure in the version 7.0.0 release (for folks who might not have upgraded their runtime to .NET 8.0.33, 9.0.22, 10.0.14 or 11.0.0).
fix!: exclude Brotli from default SentryOptions.DecompressionMethods (#…