Skip to content

Default SentryOptions.DecompressionMethods to exclude Brotli (or document opting out) after CVE-2026-111497 #5813

Closed

Description

@jmbryan4

Problem Statement

SentryOptions.DecompressionMethods defaults to every method the platform supports:

https://github.com/getsentry/sentry-dotnet/blob/6.12.1/src/Sentry/SentryOptions.cs#L809-L811

public DecompressionMethods DecompressionMethods { get; set; }
    // Note the ~ enabling all bits
    = ~DecompressionMethods.None;

DefaultSentryHttpClientFactory assigns it to the transport's HttpClientHandler.AutomaticDecompression:

https://github.com/getsentry/sentry-dotnet/blob/6.12.1/src/Sentry/Internal/Http/DefaultSentryHttpClientFactory.cs#L36-L40

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.

Activity

  1. linear-code commented on Oct 26, 2026

    @linear-code
  2. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Oct 26, 2026
  3. jamescrosswell commented on Oct 27, 2026

    @jamescrosswell
    Collaborator

    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).

  4. added a commit that references this issue on Oct 27, 2026
    6c879cc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions